无法在openlitesspeed服务器上设置正确的虚拟主机配置



我最近购买了虚拟主机,但由于vhost配置或wsgi.py文件上的一些错误,我在我的域(www.trysomething.in)上得到500个错误,并使用openlitesspeed服务器

This is my context part of vhost Config
context / {

type                    appserver

URI                      /

location              /home/trysomething.in/public_html/Cking_coupons/

binPath              /usr/local/lsws/fcgi-bin/lswsgi

appType            wsgi

startupFile        Cking_coupons/wsgi.py 

envType            1

env                     LS_PYTHONBIN=/home/trysomething.in/public_html/bin/pyhton

env                     PYTHONHOME=/home/trysomething.in/public_html/

}  
This is my wsgi.py file
"""
WSGI config for Cking_coupons project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/howto/deployment/wsgi/
"""

import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'Cking_coupons.settings')
application = get_wsgi_application()
Also, I tried to access it through <my_IP:Port_no> using python manage.py runserver command, and it worked fine, but I am getting 500 error in domain, also I followed this blog https://cyberpanel.net/blog/2019/01/10/how-to-setup-django-application-on-cyberpanel-openlitespeed/
My Code is alright and everything is fine, the problem is somewhere in vhost config or virtual env or wsgi file.
Please help

你试过了吗

startupFile        wsgi.py

相对于location路径

我修正了这个错误的环境值如下所述:https://openlitespeed.org/kb/python-wsgi-applications/

我还读到一些人不得不重新安装django。

最新更新