Last active
March 2, 2018 04:18
-
-
Save kai101/7048d7483defd1dbbdd63bb17a08d6f6 to your computer and use it in GitHub Desktop.
Revisions
-
kai101 revised this gist
Mar 2, 2018 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,3 @@ Install certbot ``` sudo add-apt-repository ppa:certbot/certbot -
kai101 created this gist
Mar 2, 2018 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ ``` Install certbot ``` sudo add-apt-repository ppa:certbot/certbot sudo apt-get update sudo apt-get install python-certbot-nginx sudo certbot --authenticator standalone --installer nginx -d www.example.com --pre-hook "service nginx stop;sleep 5;" --post-hook "service nginx start;sleep 5;" ``` Auto renew cronjob ``` #cronjob renew cert 0 23 * * 6 certbot renew --pre-hook "service nginx stop;sleep 10;" --post-hook "service nginx start;" ```