I am new to server setup. And I want to set up an instance of Amazon-EC2. I configured it according to this document. http://www.soundrenalin.com/about
However, when I click the URL, I get a 502 Bad Gateway error. My project is on this path: /home/ubuntu/dsn/app .
And the folder tree /home/ubuntu/dsn :
app/ app.py static/ templates/ themes/ bin/ build/ include/ lib/ local/ run.py
Here is my configuration nginx could ( /etc/nginx/sites-available/default ):
server { listen 80; root /home/ubuntu/dsn/app index index.html index.htm; server_name localhost; location / { try_files $uri @app; } location @app { include uwsgi_params; uwsgi_pass unix:/tmp/uwsgi.sock; } }
And here is my uwsgi.ini file:
[uwsgi] chdir = /home/ubuntu/dsn/ uid = www-data gid = www-data chmod-socket = 666 socket = /tmp/uwsgi.sock module = run virtualenv = /home/ubuntu/dsn/
And other:
When I run the tail -f /var/log/nginx/error.log command, the result is:
2013/06/09 15:58:11 [error] 5321#0: *1 connect() to unix:/tmp/uwsgi.sock failed (111: Connection refused) while connecting to upstream, client: <myip>, server: localhost, request: "GET / HTTP/1.1", upstream: "uwsgi://unix:/tmp/uwsgi.sock:", host: "54.218.14.213"
How can i solve this? Thank you
source share