最近我尝试在ubuntu 14.04上使用uwsgi和nginx提供flask应用程序。但是,会发生一些错误。这是我的testblog.ini
:
[uwsgi]
module = wsgi:application
master = true
processes = 5
socket = testblog.sock
chmod-socket = 666
vacuum = true
die-on-term = true
当我运行uwsgi --ini testblog.ini
时,它运行正常。但是当我sudo start myproject
时,它会发生start: Job failed to start
。这是我的/etc/init/myproject.conf
,
description "uWSGI server instance configured to serve testblog"
start on runlevel [2345]
stop on runlevel [!2345]
setuid chester
setgid www-data
env PATH=/home/chester/myproject/testblog/venv/bin
chdir /home/chester/myproject/testblog
exec uwsgi --ini testblog.ini
env路径和目录是正确的。此外,我检查了/var/log/upstart/myproject.log
,它没有指出任何新消息。
那么我该怎么做才能解决这个问题呢?非常感谢你。