问题描述
- nginx+uwsgi+django中的uwsgi.ini配置问题
-
最近配置了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 osfrom 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明明是对啊,怎么回事,实在不知道问题出在哪里,求解
解决方案
No module named test.wsgi
--- 这个模块在哪里,怎么导入的,你的包,模块名字是否正确
解决方案二:
Nginx + uWSGI + Django 配置
django+uWSGI+Nginx配置
Nginx + uwsgi + django 配置