use flask uwsgi nginx to deploy a web application
nginx config
1 2 3 4 5 6 7 8 9 10
| server{ listen 8000; server_name your domain;
location / { include uwsgi_params; uwsgi_pass 127.0.0.1:9090; uwsgi_param UWGI_SCRIPT manage:app; } }
|
uwsgi install
WSGI quickstart
uwsgi config
1 2 3 4 5 6 7 8 9 10 11
| [uwsgi]
socket = 127.0.0.1:9090 processes = 4 threads = 2 master = true wsgi-file = /home/jay/Documents/python/flask/dy.py module = manage callable = app memory-report = true daemonize = /home/jay/Documents/python/flask/server.log
|
start uwsgi
1 2 3
| uwsgi uwsgi-config.ini
uwsgi --socket :9090 --plugin python --wsgi-file foobar.py
|
ref