Troubleshooting Flask+uWSGI+NGINX
Obstacles I met and climbed over while trying to deploy a simple Flask application with uWSGI & NGINX.
-
stracewas very helpful in debugging bothnginxanduwsgi:sudo strace `pidof nginx | sed 's/\([0-9]*\)/-p \1/g'`for example will start a single strace for multiple processes with the same name. -
Prefer to use
.inifiles for uwsgi, instead ofxml..iniseems to be a lot more common than.xml. -
Permissions are important to get right!
Create a new user for your front-end stuff and ensure that it only has access to the front-end server etc.