Python applications returns 503 on LiteSpeed
Hello,
My python application created using cPanel Application Manager (using mod_passenger module) show a 503 error when using LiteSpeed.
I searched online and it seems that LiteSpeed doesn't function automatically with Passenger/Python applications and that I need to run the following script:
/usr/local/lsws/admin/misc/enable_ruby_python_selector.sh
However running the above script returns the following output:
[ root@server ~ ] # /usr/local/lsws/admin/misc/enable_ruby_python_selector.sh
--2025-03-19 10:05:20-- http://www.litespeedtech.com/packages/lsapi/wsgi-lsapi-2.1.tgz
Resolving www.litespeedtech.com (www.litespeedtech.com)... 52.55.120.73
Connecting to www.litespeedtech.com (www.litespeedtech.com)|52.55.120.73|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 49172 (48K) [application/x-gtar]
Saving to: ‘wsgi-lsapi-2.1.tgz’
wsgi-lsapi-2.1.tgz 100%[=========================================================================================>] 48.02K --.-KB/s in 0.05s
2025-03-19 10:05:20 (1003 KB/s) - ‘wsgi-lsapi-2.1.tgz’ saved [49172/49172]
wsgi-lsapi-2.1/
wsgi-lsapi-2.1/lsapilib.c
wsgi-lsapi-2.1/configure.py
wsgi-lsapi-2.1/wsgi.h
wsgi-lsapi-2.1/wsgi-int.h
wsgi-lsapi-2.1/lsapidef.h
wsgi-lsapi-2.1/main.c
wsgi-lsapi-2.1/wsgi_start.py
wsgi-lsapi-2.1/lsapi-glue.c
wsgi-lsapi-2.1/wsgiinput.c
wsgi-lsapi-2.1/wsgi.c
wsgi-lsapi-2.1/lsapilib.h
wsgi-lsapi-2.1/Makefile.in
wsgi-lsapi-2.1/version.h
wsgi-lsapi-2.1/interp.h
wsgi-lsapi-2.1/test.py
wsgi-lsapi-2.1/wsgiwrapper.c
Install wsgi-lsapi for python 311
Last metadata expiration check: 3:18:19 ago on Wed 19 Mar 2025 06:47:01 AM +03.
No match for argument: alt-python311-wsgi-lsapi
Error: Unable to find a match: alt-python311-wsgi-lsapi
Done.
Last metadata expiration check: 3:18:20 ago on Wed 19 Mar 2025 06:47:01 AM +03.
No match for argument: devtoolset-7-toolchain
Error: Unable to find a match: devtoolset-7-toolchain
cp: cannot stat 'lswsgi': No such file or directory
rm -f lswsgi *.o core *.core
[ root@server ~ ] #
Any suggestion?
Thanks in advance.
-
Hey there! You are correct that sometimes there are issues between LiteSpeed and Passenger, but CloudLinux has information on how to get this working. Can you work through the following guide to see if that helps with your situation?
0 -
Hello cPRex,
Thank you for the reply. Upon looking deeper into this, you're right, when using LiteSpeed as a webserver, only CloudLinux based servers can host Python applications. Since we're on AlmaLinux 9, unfortunately there is no chance to get this working. We'll have to take a different route either disable LiteSpeed and use Apache, or install CloudLinux.
Kind regards,
Mohammed Kadhim
0 -
I'm sorry there isn't a way to get this working, but I'm glad this at least got you pointed in the right direction.
0
Please sign in to leave a comment.
Comments
3 comments