Flask, nginx, and uwsgi

女生的网名这么多〃 提交于 2019-12-01 06:33:45

unix sockets are filesystem objects, so nginx need write permissions to /tmp/uwsgi.sock

You are running uWSGI as root (why ???) so /tmp/uwsgi.sock will be owned by root while nginx generally runs as nobody or www-data.

If you do not want to take in account permissions just use TCP sockets, but obviously do not run your app as root.

You can have a look on this: Python flask with Nginx and uWSGI as the repo provides the exact case / scenario on how to use Flask in production mode.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!