nginx + uwsgi: -- unavailable modifier requested: 0 --

Lisio picture Lisio · May 25, 2012 · Viewed 40.4k times · Source

Ubuntu 12.04, nginx 1.2.0, uwsgi 1.0.3.

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

On each request nginx replies with 502 and uwsgi writes to log the following line:

-- unavailable modifier requested: 0 --

Answer

SHaKie picture SHaKie · Jun 15, 2012

Original answer

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.

Edit: Updated for Python 3 and Ubuntu 17.10

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.

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