Chinaunix

标题: nginx+django+uwsgi 配置问题 [打印本页]

作者: remark    时间: 2017-12-15 17:47
标题: nginx+django+uwsgi 配置问题
CentOS6.4  Python3.6
单独测试 uwsgi --http :9001 --module demosite.wsgi     客户端访问结果正常
配置到nginx里测试
日志显示
Traceback (most recent call last):
  File "./demosite/wsgi.py", line 13, in <module>
    from django.core.wsgi import get_wsgi_application
ModuleNotFoundError: No module named 'django'
unable to load app 0 (mountpoint='10.101.101.85:8000|') (callable not found or import error)
--- no python application found, check your startup logs for errors ---
10.101.101.85:8000 [pid: 25374|app: -1|req: -1/1] 10.1.206.16 () {46 vars in 804 bytes} [Fri Dec 15 17:32:23 2017] GET / => generated 21 bytes in 1 msecs (HTTP/1.1 500) 2 headers in 83 bytes (0 switches on core 0)
这个错误很奇怪  python3里import django肯定是没问题的
作者: remark    时间: 2017-12-15 17:49
https://segmentfault.com/q/1010000002523354/a-1020000002526934
配置基本是按这个来配的




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2