【问题标题】:nginx and uwsgi issue on EC2EC2 上的 nginx 和 uwsgi 问题
【发布时间】:2013-10-02 19:34:14
【问题描述】:

我按照本教程设置了 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

【问题讨论】:

    标签: django nginx uwsgi


    【解决方案1】:

    听起来像是路径问题

    在你的uwsgi ini文件中你可以尝试添加

    home=<abs path to your virtualenv>
    

    所以如果你完全按照教程去做,那就是

    home=/home/USER/projects/venv
    

    【讨论】:

      猜你喜欢
      • 2014-03-31
      • 2020-03-04
      • 2015-11-08
      • 1970-01-01
      • 2013-11-07
      • 2016-10-17
      • 2012-11-13
      • 2013-09-20
      • 1970-01-01
      相关资源
      最近更新 更多