我最近购买了虚拟主机,但由于 vhost 配置或 wsgi.py 文件中的一些错误,我的域(www.trysomething.in)和使用 openlitespeed 服务器出现 500 错误
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