问题描述
Ubuntu 12.04,nginx 1.2.0,uwsgi 1.0.3
Ubuntu 12.04, nginx 1.2.0, uwsgi 1.0.3.
我使用以下命令启动uwsgi:
I start uwsgi with the following command:
uwsgi -s 127.0.0.1:9010 -M -t 30 -A 4 -p 4 -d /var/log/uwsgi.log
在每个请求中,nginx都会回复502,而uwsgi会写入日志以记录以下行:
On each request nginx replies with 502 and uwsgi writes to log the following line:
-- unavailable modifier requested: 0 --
推荐答案
原始答案
对于Ubuntu 11.10上的 Python 2 ,使用upstart
,将uWSGI
的python插件与apt-get install uwsgi-plugin-python
一起安装,如果您使用的是ini文件来配置uWSGI
应用, ,然后将plugins = python
添加到[uwsgi]
部分,它应该可以解决此问题.
For Python 2 on Ubuntu 11.10, using upstart
, install the python plugin for uWSGI
with apt-get install uwsgi-plugin-python
and if you're using an ini file to configure your uWSGI
app, then add plugins = python
to the [uwsgi]
section and it should solve this problem.
已针对Python 3和Ubuntu 17.10更新
对于Ubuntu 17.10上的 Python 3 ,使用systemd
,将uWSGI
的python插件与apt-get install uwsgi-plugin-python3
一起安装,如果您使用的是ini文件来配置uWSGI
应用, ,然后将plugins = python
添加到[uwsgi]
部分,它应该可以解决此问题.
For Python 3 on Ubuntu 17.10, using systemd
, install the python plugin for uWSGI
with apt-get install uwsgi-plugin-python3
and if you're using an ini file to configure your uWSGI
app, then add plugins = python
to the [uwsgi]
section and it should solve this problem.
有关python
/uWSGI
应用程序入门的更多信息,包括如何使用ini
文件进行配置,请查看此便捷的指南
For more information on getting started with python
/uWSGI
apps, including how to configure them using an ini
file then please take a look at this handy guide
这篇关于nginx + uwsgi:-请求了不可用的修饰符:0-的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!