Skip to content

Instantly share code, notes, and snippets.

@algonacci
Last active October 16, 2022 04:42
Show Gist options
  • Select an option

  • Save algonacci/ccadae98fe1461be6b6a9be4fcf27f95 to your computer and use it in GitHub Desktop.

Select an option

Save algonacci/ccadae98fe1461be6b6a9be4fcf27f95 to your computer and use it in GitHub Desktop.
Nginx Configuration for Flask App Deployment
server {
listen 80;
server_name www.travens-ai.my.id;
location /static {
alias /root/flask-vm/static;
}
location / {
proxy_pass http://127.0.0.1:5000;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
@algonacci
Copy link
Author

/etc/nginx/nginx.conf

#user www-data;
user root;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment