kyle_jqk
kyle_jqk
采纳率62.5%
2015-12-15 05:28 阅读 6.3k

nginx+uwsgi+django中的uwsgi.ini配置问题

5

最近配置了nginx+uwsgi+django,其中项目目录下我新建了uwsgi.ini配置文件
[uwsgi]
socket = 127.0.0.1:8088
master = true
pidfile = /tmp/uwsgi.pid
processes = 8
chdir = /home/test
daemonize=/home/log/uwsgi.log
module = test.wsgi:application
max-request=5000
其中wsgi.py
import os

from django.core.wsgi import get_wsgi_application

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "test.settings")

application = get_wsgi_application()

启动uwsgi之后,日志报错如下:
*** Python threads support is disabled. You can enable it with --enable-threads ***
Python main interpreter initialized at 0x1aa6b70
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 654840 bytes (639 KB) for 8 cores
*** Operational MODE: preforking ***
ImportError: No module named test.wsgi
unable to load app 0 (mountpoint='') (callable not found or import error)
*** no app loaded. going in full dynamic mode ***
*** uWSGI is running in multiple interpreter mode ***

module明明是对啊,怎么回事,实在不知道问题出在哪里,求解

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

1条回答 默认 最新

  • oyljerry oyljerry 2015-12-15 07:17

    No module named test.wsgi
    --- 这个模块在哪里,怎么导入的,你的包,模块名字是否正确

    点赞 评论 复制链接分享

相关推荐