Skip to content

Instantly share code, notes, and snippets.

@WesleyAC
Created January 21, 2022 15:00
Show Gist options
  • Save WesleyAC/a9b4d6079854a6617f9fe6be96beddfa to your computer and use it in GitHub Desktop.
Save WesleyAC/a9b4d6079854a6617f9fe6be96beddfa to your computer and use it in GitHub Desktop.
Nginx config for https://hanabi.site
server {
server_name hanabi.site;
location / {
proxy_pass http://127.0.0.1:8000/;
}
listen [::]:443 ssl; # managed by Certbot
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/hanabi.site/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/hanabi.site/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = hanabi.site) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80 default_server;
listen [::]:80 default_server;
server_name hanabi.site;
return 404; # managed by Certbot
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment