Created
May 27, 2018 10:46
-
-
Save mrngm/5426656caa13ac103c85e319a20c5790 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
location /.well-known/acme-challenge/ { | |
alias /var/www/challenges/.well-known/acme-challenge/; | |
try_files $uri @forward_https; | |
} | |
location @forward_https { | |
return 301 https://$host$request_uri; | |
} | |
location / { | |
return 301 https://$host$request_uri; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
server_name server.tld; | |
listen [::]:80; | |
include hooks/letsencrypt.conf; | |
} | |
server { | |
server_name server.tld; | |
listen [::]:443 ssl; # http2 | |
ssl on; | |
ssl_certificate /etc/letsencrypt/live/server.tld/fullchain.pem; | |
ssl_certificate_key /etc/letsencrypt/live/server.tld/privkey.pem; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment