python - 502 Bad Gateway error on nginx - Ubuntu -


i had django app running alright on ubuntu server nginx , gunicorn. until tried kill gunicorn, change settings in settings.py , tried restart nginx , gunicorn. gunicorn runs without issue 502 bad gateway , error log nginx looks this:

2015/07/07 09:18:23 [error] 19905#0: *14 connect() failed (111: connection refused)  while connecting upstream, client: 101.212.66.163, server: domainname.com,  request: "get / http/1.1", upstream: "http://domainip:8001/", host: "www.domainname.com" 

what's wrong here? sorry i'm pretty new nginx , gunicorn both.

edit : wiped out in hope of resetting again getting exact same error



conf application in /etc/nginx/sites-available/appname looks this:

server {         server_name domainname.com;          access_log off;          location /static/ {             alias /opt/myenv/static/;         }          location /media/ {             alias /opt/myenv/media/;         }          location / {                 proxy_pass http://domain_ip:8001;                 proxy_set_header x-forwarded-host $server_name;                 proxy_set_header x-real-ip $remote_addr;                 add_header p3p 'cp="all dsp cor psaa psda our nor onl uni com n$         } 


Comments

Popular posts from this blog

android - Pass an Serializable object in AIDL -

How to provide Authorization & Authentication using Asp.net, C#? -

How to use Authorization & Authentication in Asp.net, C#? -