我正在尝试配置uwsgi,教程中说我必须运行以下命令:
uwsgi -s /tmp/uwsgi.sock -w myapp:app
问题是-w选项无效。有谁能帮我指出为什么或我应该怎么做?
谢谢
也许您正在使用Debian提供的软件包。它们是完全模块化的,因此您需要安装/加载所需的插件:
我的uwsgi应用程序配置如下:
/etc/uwsgi/apps-enabled/mysite.ini
[uwsgi]
socket=/tmp/uwsgi_mysite.sock
chmod-socket=666
abstract-socket=false
master=true
workers=2
uid=altera
gid=altera
chdir=/home/altera/www/mysite ; Current dir
pp=/home/altera/www/mysite ; Python Path (to your application)
pyhome=/home/altera/vpy/mysite ; Path to virtual environment
plugins=python3
module=main ; *.py file name application starting from
post-buffering=8192
/etc/nginx/sites-available/mysite
server {
server_name mysite;
root /home/altera/www/mysite;
location / {
include uwsgi_params;
uwsgi_pass unix:/tmp/uwsgi_mysite.sock;
}
}
apt-get install uwsgi-plugin-python
,然后在我的uwsgi ini文件中添加plugin=python
。 - Roshambo/etc/conf.d/
中的 uWSGI 配置中设置UWSGI_EXTRA_OPTIONS=--plugins=python27
。 - scvalex