简体   繁体   中英

WSGI/Nginx/Internal server error arises when I deactivate virtual environment (no python application found)

I'm stuck with this error. -— no python application found, check your startup logs for errors —- Internal server error.

Whenever I'm in virtual environment all works fine but If I deactivate virtualenv I'm constantly getting this error each time when I send a GET query to my webpage. So because of this problem Im getting this error in supervisor mode.

I have tested this outside of supervisor mode using this command: uwsgi —ini my_site_uwsgi.ini And like I said before It works fine when I'm in virtualenv and It raises error listed above error when I deactivate virtualenv.

#codepaint_news_uwsgi.ini
[uwsgi]

chdir = /home/django/codepaint
module = codepaint.wsgi
home = /home/django/venv
master = true
processes = 10
socket = /home/django/codepaint/uwsgi_nginx.sock
chmod-socket = 666
vacuum = true
env = DEBUG_MODE=False
_____________________________________
#wsgi.py

import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "codepaint.settings")
application = get_wsgi_application()
______________________________________

Internal server error. -— no python application found, check your startup logs for errors —-

将venv中已安装的应用程序与非venv中的已安装应用程序(全局python)进行比较。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM