Configure basic python 3.5, flask, uwsgi, nginx app
Let's go...
- Remove
/var/www/flasktest/uwsgi.ini
, you don't need this. -
uwsgi
:- ...can't bind to your socket; change the
socket
directive in youruwsgi.ini
to/tmp/%n.sock
.%n
will get evaluated to the name of the config file, sans extension. - Does
uwsgi
work if you start it? Have a look inside the logs; if you'll find errors, please post these.
- ...can't bind to your socket; change the
-
Nginx
:- Change your
uwsgi_pass
directive touwsgi_pass unix:///tmp/flasktest.sock
and insertinclude uwsgi_params;
at the next line. - Reverse the order of the
/
and/static
config blocks to make sure these work as expected. As it stands,/
will be hit for all requests, including/static
, so these would be served by your backend, which isn't wise to do, given the files being served are static and not dynamic.
- Change your