-
Notifications
You must be signed in to change notification settings - Fork 0
nginx and uWSGI
Thierry Lam edited this page Feb 10, 2023
·
4 revisions
Flask profject structure:
myapp/
app.py
sudo apt-get install nginx
server {
location / { try_files $uri @yourapplication; }
location @yourapplication {
include uwsgi_params;
uwsgi_pass unix:/tmp/uwsgi.sock;
}
}
sudo ln -s /etc/nginx/sites-available/myapp myapp
sudo service nginx start
pip install uwsgi
/home/gdev/.virtualenvs/myapp/bin/uwsgi --socket 0.0.0.0:8080 --protocol=http -w app:app --logto /tmp/myapp_debug.log &
Access the web page at http://your.ip.number:8080