lswgi config for django app confusion

#1
Hello everyone, I am working on a project using Django. I chose to host it on a Hostinger ubuntu instance. Being relatively new to linux also, I opted for a "Ubuntu/Django/OpenLiteSpeed" OS template.
To my surprise, during the installation, I was directed to create a DigitalOcean account, and was asked for a credit card number. I wasn't thrilled, but I continued. I now had another linux instance ... costing me close to 1$/day ( a least twice the price of the Hostinger instance I already paid for)

2 or 3 days later I decided to delete this DigitalOcean "unwanted" instance. Shortly after that, my first linux instance ( the "wanted" one) became unresponsive, and only after a lengthy exchange with Hostinger support, were they able to "reset" my instance. Not completely reset though, I lost a bit of work, but I just had to pull my repo again, and my django app was running fine.

I later realized that, "OpenLiteSpeed" and "OpenLiteSpeed Server" , are not the same thing.
What have I configured ? the "free" openlitespeed version, or the "entreprise" one ?

I tried to install openlitespeed on windows ( using WSL2). It installs fine, the demo page seems ok too. But I have all the trouble in the world to reproduce locally the config I have on myHostinger instance.
It might be permissions issues or something else , but the only real difference I could find was the lswsgi executable found in /usr/local/lsws/fcgi-bin/ the one I have locally has a weight of 0 bytes ( this can't be right ?)

I known this post is pretty messy, I have trouble understanding where or what the issue is...
 

Cold-Egg

Administrator
#2
My experience is, that when you create an OLS Django template + instance, it should be an instance from Hostinger instead of another VPS provider. The price depends on the server type/spec, 1$/day is probably a powerful server.

As long as it is named OpenLiteSpeed, then it's the community version.
OpenLiteSpeed can only be installed on Linux system, unless you use docker?
 
#3
Hi , thank you for your answer

OpenLiteSpeed can only be installed on Linux system, unless you use docker?
No Docker. I installed OLS on ubuntu 22 both on the Hostinger instance and on windows (WSL2). I didn't find any real difference, behaviour wise, while using WSL ( apart from some small config, on the Windows side, to enable "port forwarding" from ubuntu. ) So I don't think windows is my problem.

During my search, I found some old posts with a broken link to as shell script to configure lswsgi for a python/django app. ( I cannot find the link of that post right now ). But that link was hosted on something like litespeedtech.com ... this is the "entreprise" version, isn't it ?
 
#5
I think that is the page I was talking about.
It fails at the "Install WSGI" step.
The url in curl command is no longer valid.
 

Cold-Egg

Administrator
#6
@gui2one
you need to replace the "VERSION" with a real number, e.g. 2.1. So the curl command will be like this
Code:
curl -O http://www.litespeedtech.com/packages/lsapi/wsgi-lsapi-2.1.tgz
 

Cold-Egg

Administrator
#7
As I said before, if you launch the server from the template, the lswsgi should be configured by default, have you contacted their support team regarding it?
 
#9
This was the solution. I was able to install and configure correctly my django app.
Thanks a lot, it cleared out a lot of things for me :)
 
Top