nginx + uwsgi + debian + daemon nginx + uwsgi + debian + daemon nginx nginx

nginx + uwsgi + debian + daemon


You could consider using http://supervisord.org/ to look after your process. As for serving your application, I'm only familiar with the arrangement where the WSGI server is invoked through Python. The Flask docs would have you use gevent like:

from gevent.wsgi import WSGIServerfrom yourapplication import apphttp_server = WSGIServer(('', 5000), app)http_server.serve_forever()

If you don't have some particular reason to use uWSGI as an application server, I find this setup much easier. nginx just needs to act as a proxy. If uWSGI is a requirement, Flask docs have a section about nginx config, though I imagine you've already checked it out. If not: http://flask.pocoo.org/docs/deploying/uwsgi/#configuring-nginx