Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

Commit

Permalink
Cert renewal format (#108)
Browse files Browse the repository at this point in the history
* fix: Fix formatting of code block

Code block was not rendering correctly in readthedocs.

* docs: remove numbering

Numbering was not formatting correctly in readthedocs

* docs: remove extra space for code block

* docs: fix spelling of header
  • Loading branch information
kjkeane authored and anthonylavado committed Sep 1, 2019
1 parent 293d58d commit dba73e2
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions docs/administrator-docs/reverse-proxy.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,30 +230,30 @@ Haproxy needs to have the certificate and key files concatenated into the same f

Uncomment `bind *:443` and the redirect section in the configuration, then reload the service.

#### Autmoatic Certificate Renewal
#### Automatic Certificate Renewal

1. Place the following script in `/usr/local/bin/` to automatically update your SSL certificate:
Place the following script in `/usr/local/bin/` to automatically update your SSL certificate:

```
SITE=DOMAIN_NAME
```
SITE=DOMAIN_NAME
# move to the correct let's encrypt directory
cd /etc/letsencrypt/live/$SITE
# move to the correct let's encrypt directory
cd /etc/letsencrypt/live/$SITE
# cat files to make combined .pem for haproxy
cat fullchain.pem privkey.pem > /etc/ssl/$SITE.pem
# cat files to make combined .pem for haproxy
cat fullchain.pem privkey.pem > /etc/ssl/$SITE.pem
# reload haproxy
service haproxy reload
```
# reload haproxy
service haproxy reload
```

2. Make sure the script is executable
Make sure the script is executable

``chmod u+x /usr/local/bin/letsencrypt-renew.sh``
``chmod u+x /usr/local/bin/letsencrypt-renew.sh``

3. Add a job to cron so the certificate will be renewed automatically:
Add a job to cron so the certificate will be renewed automatically:

``@monthly /usr/bin/certbot renew --renew-hook "/usr/local/bin/letsencrypt-renew.sh" >> /var/log/letsencrypt-renewal.log``
``@monthly /usr/bin/certbot renew --renew-hook "/usr/local/bin/letsencrypt-renew.sh" >> /var/log/letsencrypt-renewal.log``

### Nginx

Expand Down

0 comments on commit dba73e2

Please sign in to comment.