unknown directive "uwsgi_pass"

Francis Daly francis at daoine.org
Thu Oct 21 02:44:28 MSD 2010

On Wed, Oct 20, 2010 at 03:27:28PM -0400, Yan Huang wrote:

Hi there,

> I'm new to nginx. We are migrating from Apache to Nginx and I'm having
> this problem when I tried to configure Nginx, uwsgi and django.
> [emerg]: unknown directive "uwsgi_pass" in /etc/nginx/nginx.conf:156
> configuration file /etc/nginx/nginx.conf test failed

That strongly suggests that the nginx you are using does not include
the uwsgi module.

> I'm using nginx-0.7.67-1.fc13.x86_64 on Fedora. I have uwsgi installed
> and running.

The srpm at


doesn't mention uwsgi at all, as far as I can see.


has some references at the end. One says that the uwsgi module was
included in nginx from 0.8.40. It describes how to add it to an 0.7
series build.

Another is from April and is titled "Running Django with Nginx and
uWSGI". It might be interesting.

> Any insight on what I did wrong?

Just using an nginx which doesn't speak the uwsgi protocol.

You'll have to find-or-build an 0.7 one with the extra module included,
or else find (or build) a recent 0.8 version, which will include uwsgi
by default.

Good luck with it,

Francis Daly        francis at daoine.org

More information about the nginx mailing list