启动uwsgi时遇到问题:
unable to find "application" callable in file dashboard/wsgi.py
unable to load app 0 (mountpoint='') (callable not found or import error)
uwsgi.ini:
[uwsgi]
socket = /tmp/dashboard.sock
chdir = /srv/http/depo-dashboard/
wsgi-file = dashboard/wsgi.py
callable = app
processes = 4
threads = 2
chmod-socket = 666
wsgi.py:
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "dashboard.settings")
application = get_wsgi_application()
在我看来一切都应该没问题,但事实并非如此......
答案1
嗯,我想我找到了解决方案:只需将其替换wsgi-file = dashboard/wsgi.py
为这个module = dashboard.wsgi:application