Trying to set up Nginx and uWSGI on Ubuntu 13.10.
When I try to access the website, all I get is "502 Bad Gateway".
Ran apt-get install nginx uwsgi uwsgi-plugin-python3
to install nginx/uwsgi.
/etc/nginx/sites-enabled/webpage.com:
server {
listen 80;
server_name webpage.com;
access_log /var/log/nginx/webpage.com_access.log;
error_log /var/log/nginx/webpage.com_error.log;
location / {
uwsgi_pass /var/run/webpage.com.uwsgi.socket;
include uwsgi_params;
uwsgi_param Host $host;
uwsgi_param X-Real-IP $remote_addr;
uwsgi_param UWSGI_SCHEME $scheme;
uwsgi_param SERVER_SOFTWARE nginx/$nginx_version;
}
}
/etc/uwsgi/apps-enabled/webpage.com
[uwsgi]
vhost = true
plugin = python3
socket = /tmp/webpage.com.sock
master = true
enable-threads = true
processes = 2
home = /var/www/webpage.com/env
wsgi-file = /var/www/webpage.com/env/hello.py
virtualenv = /var/www/webpage.com/env
chdir = /var/www/webpage.com/env
touch-reload = /var/www/webpage.com/reload
/var/log/nginx/webpage.com_error.log
2014/01/17 16:28:58 [error] 25073#0: *13 connect() to unix:///var/run/webpage.com.uwsgi.socket failed (111: Connection refused) while connecting to upstream, client: 83.109.132.224, server: webpage.com, request: "GET / HTTP/1.1", upstream: "uwsgi://unix:///var/run/webpage.com.uwsgi.socket:", host: "webpage.com"
hello.py
is just a simple hello world app.
Have been struggling with this for several hours... Now I need help :)