Skip to content

Instantly share code, notes, and snippets.

@jonluca
Last active March 16, 2018 21:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonluca/dd57551f0c6f314cbc4481e14cdd0e4b to your computer and use it in GitHub Desktop.
Save jonluca/dd57551f0c6f314cbc4481e14cdd0e4b to your computer and use it in GitHub Desktop.
HTTPS Nginx Config
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name jonlu.ca www.jonlu.ca;
root /var/www/html;
index index.html index.htm;
location ~ /.git {
deny all;
}
location / {
allow all;
}
ssl_certificate /etc/letsencrypt/live/jonlu.ca/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/jonlu.ca/privkey.pem; # managed by Certbot
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment