我按照本教程设置了 nginx 和 uwsgi:
http://panta.info/blog/3/how-to-install-and-configure-nginx-uwsgi-and-django-on-ubuntu.html
我收到以下错误:
Thu Sep 26 17:33:11 2013 - *** Operational MODE: preforking ***
Traceback (most recent call last):
File "/var/www/repo/mysite/mysite/mysite/wsgi.py", line 24, in <module>
from django.core.wsgi import get_wsgi_application
ImportError: No module named django.core.wsgi
但是当我这样做时,它会起作用:
Python 2.7.3 (default, Sep 26 2012, 21:51:14)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from django.core.wsgi import get_wsgi_application
>>> get_wsgi_application()
<django.core.handlers.wsgi.WSGIHandler object at 0x7f3b23281790>
>>>
还有什么我想念的吗?我一直在尝试调试它一段时间,任何帮助表示赞赏!
我也参考了这个页面无济于事:
http://uwsgi-docs.readthedocs.org/en/latest/WSGIquickstart.html