Created
April 10, 2019 10:23
-
-
Save kmvan/48797770cf0601be90f2996f27cb27c2 to your computer and use it in GitHub Desktop.
nginx ssl site conf
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
ssl_certificate /etc/letsencrypt/live/DOMAIN/fullchain.pem; | |
ssl_certificate_key /etc/letsencrypt/live/DOMAIN/privkey.pem; | |
if ($scheme = http) { | |
return 301 https://$server_name$request_uri; | |
} | |
if ($host != DOMAIN) { | |
return 301 $scheme://DOMAIN$request_uri; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment