M
M
Mikhail Mikhail2016-03-07 12:06:36
Nginx
Mikhail Mikhail, 2016-03-07 12:06:36

Why won't the web server start?

Good afternoon.
I can not deploy the site on the hosting.
being in the /var/www/flask/ folder with the project,
uwsgi_python3 --http=socket :8000 -w run:app
everything works fine (everything was done through root) when entering the site with port 8000.
but I can't get it all to work through nginx
, for this I created it in the project.ini folder with the project

[uwsgi]
module = wsgi
master = true
processes = 5
socket = /var/www/flask/flask.sock
chmod-socket = 664
vacuum = true
die-on-term = true


and in /etc/nginx/site-available/flask.conf
server {
        listen 80;
        server_name myIP;
        location / {
        include uwsgi_params;
        uwsgi_pass unix:/var/www/flask/flask.sock;
        }
        location /static/{
        root /var/www/flask/app/static/;
        }
}


I get on the site
502 Bad Gateway

and in /etc/var/log/nginx/error.log
2016/03/07 04:02:54 [crit] 1307#0: *1 connect() to unix:/var/www/flask/flask.sock failed (13: Permission denied) while connecting to upstream, client: *.*.*.*, server: *.*.*.*, request: "GET / HTTP/1.1", upstream: "uwsgi://unix:/var/www/flask/flask.sock:", host: "*.*.*.*"
2016/03/07 04:02:55 [crit] 1307#0: *1 connect() to unix:/var/www/flask/flask.sock failed (13: Permission denied) while connecting to upstream, client: *.*.*.*, server: *.*.*.*, request: "GET /favicon.ico HTTP/1.1", upstream: "uwsgi://unix:/var/www/flask/flask.sock:", host: "*.*.*.*", referrer: "http://*.*.*.*/"


what am I doing wrong ?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sim3x, 2016-03-07
@sim3x

Specify the directory where your wsgi.py is located

chdir = path_to_web2py
module = wsgi

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question