Skip to content

Instantly share code, notes, and snippets.

@kai101
Last active March 2, 2018 04:18
Show Gist options
  • Select an option

  • Save kai101/7048d7483defd1dbbdd63bb17a08d6f6 to your computer and use it in GitHub Desktop.

Select an option

Save kai101/7048d7483defd1dbbdd63bb17a08d6f6 to your computer and use it in GitHub Desktop.

Revisions

  1. kai101 revised this gist Mar 2, 2018. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion readme.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,3 @@
    ```
    Install certbot
    ```
    sudo add-apt-repository ppa:certbot/certbot
  2. kai101 created this gist Mar 2, 2018.
    14 changes: 14 additions & 0 deletions readme.md
    Original 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;"
    ```