免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2608 | 回复: 1

nginx+django+uwsgi 配置问题 [复制链接]

论坛徽章:
0
发表于 2017-12-15 17:47 |显示全部楼层
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肯定是没问题的

论坛徽章:
0
发表于 2017-12-15 17:49 |显示全部楼层
https://segmentfault.com/q/1010000002523354/a-1020000002526934
配置基本是按这个来配的
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP