Skip to content

Instantly share code, notes, and snippets.

@wendeehsu
Created January 26, 2021 03:28
Show Gist options
  • Save wendeehsu/9c2c1c63ba8167720c1638c0da995f7d to your computer and use it in GitHub Desktop.
Save wendeehsu/9c2c1c63ba8167720c1638c0da995f7d to your computer and use it in GitHub Desktop.
nginx config for routing HTTPS(Certbot) to flask app
root /var/www/html;
# Add index.php to the list if you are using PHP
index index.html index.htm index.nginx-debian.html;
server_name project.site; # managed by Certbot
location / {
proxy_pass http://127.0.0.1:8000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_redirect off;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment