Question
Flask install 502 Bad Gateway nginx
I am beginner in python development and I first time tried to upload to server DigitalOcean. I followed this tutorial link. But I have a problem when I finished tutorial 502 Bad Gateway nginx/1.10.0 (Ubuntu)
Zlty.ini
[uwsgi]
module = wsgi:app
master = true
socket = zlty.sock
chmod-socket = 660
vacuum = true
die-on-term = true
Zlty.service
[Unit]
Description=uWSGI instance to serve zlty
After=network.target
[Service]
User=dendis
Group=www-data
WorkingDirectory=/home/dendis/zlty
Environment="PATH=/home/dendis/zlty/zltyenv/bin"
ExecStart=/home/dendis/zlty/zltyenv/bin/uwsgi --ini zlty.ini
[Install]
WantedBy=multi-user.target
sites-available
server {
listen 80;
server_name 139.59.145.129;
location / {
include uwsgi_params;
uwsgi_pass unix:/home/dendis/zlty/zlty.sock;
}
}
Log in nginx
2016/07/26 03:53:02 [crit] 9563#9563: *9 connect() to unix:/home/dendis/zlty/zlty.sock failed (2: No such file or directory) while connecting to upstream, client: 188.123.100.136, server: 139.59.145.129, request: "GET / HTTP/1.1", upstream: "uwsgi://unix:/home/dendis/zlty/zlty.sock:", host: "139.59.145.129"
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×
Which tutorial did you follow? The link you attempted to provide didn’t appear.