Nginx + Uwsgi Error: unknown directive "uwsgi_pass"

Josh Haimson jhaimson at MIT.EDU
Mon Jun 24 21:25:21 UTC 2013

Hi all,

I'm trying to configure nginx 1.1.19 on an ubuntu server with uwsgi.  It
works fine on my ubuntu dev machine with the same exact version of nginx,
but for some reason I get the following error when I try to start nginx on
my production server:
Starting nginx: nginx: [emerg] unknown directive "uwsgi_pass" in
nginx: configuration file /etc/nginx/nginx.conf test failed

I had seen this in an earlier
but the issue was that they were running an older version of nginx which
didn't support uwsgi natively.  Does anyone know why I'd be getting this
error when I'm running a version that should support uwsgi natively?

For reference, my nginx.conf file is below:



upstream django {
    server unix:/tmp/django.sock;

server {
    listen      8000;
    charset     utf-8;
    client_max_body_size 75M;

    location / {
        uwsgi_pass  django;
        include     /home/django-server/uwsgi_params;

Josh Haimson
Massachusetts Institute of Technology 2016
Departments of Computer Science and Biology
JHaimson at | 516.640.6221
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list