Last active
April 28, 2017 13:38
-
-
Save ricsiga/3d91484362d8e3c796739b51081460c0 to your computer and use it in GitHub Desktop.
letsencrypt nginx redirect
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
# renew letsenrcypt cert | |
30 2 * * 1 /usr/bin/letsencrypt renew >> /var/log/le-renew.log | |
35 2 * * 1 /bin/systemctl reload nginx |
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
letsencrypt certonly --webroot -w /workspace/letsencrypt/example.com -d example.com |
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 { | |
listen 80; | |
server_name example.com; | |
root /workspace/letsencrypt/example.com; | |
location /.well-known { | |
} | |
location / { | |
rewrite ^(.*)$ https://example.com$1 permanent; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment