Nginx und uWSGI: Connection refused und 502 Bad Gateway Fehler

Versuchen, Nginx und uWSGI auf Ubuntu 13.10.

Wenn ich versuche auf die website zugreifen, ich erhalte die Meldung "502 Bad Gateway".

Lief apt-get install nginx uwsgi uwsgi-plugin-python3 zu installieren nginx/uwsgi.

/etc/nginx/sites-enabled/Webseite.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-aktiviert/Homepage.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/Homepage.com_error.melden Sie

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 ist nur eine einfache hello world app.

Kämpfen haben, mit dieser für mehrere Stunden... Jetzt brauche ich Hilfe 🙂

  • sehr wahrscheinlich ist dein uWSGI-Instanz nicht ausgeführt wird, überprüfen Sie mit "ps aux" und überprüfen Sie, uWSGI Protokolle zu
InformationsquelleAutor | 2014-01-17
Schreibe einen Kommentar