listening but not connecting

Larry Martell larry.martell at gmail.com
Thu Jul 28 19:01:17 UTC 2016


Trying to set up nginx and uwsgi for django. Following the directions here:

https://www.digitalocean.com/community/tutorials/how-to-serve-django-applications-with-uwsgi-and-nginx-on-centos-7

netstat shows that nginx is listening on port 80:

tcp        0      0 0.0.0.0:80              0.0.0.0:*
LISTEN      9256/nginx: master

But I cannot connect from my browser (I get connection timeout):

This is my nginx.conf file:

worker_processes  1;

events {
    worker_connections  1024;
}

http {
    include            mime.types;
    default_type       application/octet-stream;
    keepalive_timeout  65;
    sendfile           on;

    client_max_body_size 20M;

    include /etc/nginx/sites-enabled/*;
}

In /etc/nginx/sites-enabled I have this one file:

# motor_nginx.conf

# the upstream component nginx needs to connect to
upstream django {
    server unix:///usr/local/motor/motor.sock; # for a file socket
}

# configuration of the server
server {
    # the port your site will be served on
    listen      80;
    # the domain name it will serve for
    server_name localhost;
    charset     utf-8;

    # max upload size
    client_max_body_size 75M;   # adjust to taste

    # Django media
    location /media  {
        alias /usr/local/motor/motor/media;
    }

    location /static {
        alias /usr/local/motor/motor/static;
    }

    # Finally, send all non-media requests to the Django server.
    location / {
        uwsgi_pass  django;
        include     /usr/local/motor/motor/uwsgi_params;
    }
}

The error log has just this one line:

2016/07/28 14:26:41 [notice] 8737#0: signal process started

And there is nothing in the access.log.

Any ideas what I could be missing or what i should check?



More information about the nginx mailing list