Blame
|
1 | # SSL Certificates |
||||||
| 2 | ||||||||
| 3 | [LetsEncrypt](https://letsencrypt.org/getting-started/) is an easy, free way to have X.509 (SSL) Certificates on a web server. Rather than install the certificate files manually, they provide a handy utility that will download a cert, configure Apache, and install the certificate on an ongoing basis. |
|||||||
| 4 | 1. Install Certbot. |
|||||||
| 5 | Run this command on the command line on the machine to install Certbot. |
|||||||
|
6 | `sudo zypper install certbot python-certbot-apache` (or the appropriate Linux package manager command) |
||||||
|
7 | 2. Choose how you'd like to run Certbot |
||||||
| 8 | * Either get and install your certificates... |
|||||||
| 9 | Run this command to get a certificate and have Certbot edit your Apache configuration automatically to serve it, turning on HTTPS access in a single step. |
|||||||
| 10 | `sudo certbot --apache` |
|||||||
| 11 | * Or, just get a certificate |
|||||||
| 12 | If you're feeling more conservative and would like to make the changes to your Apache configuration by hand, run this command. |
|||||||
| 13 | `sudo certbot certonly --apache` |
|||||||
| 14 | 3. Set up automatic renewal |
|||||||
| 15 | We recommend running the following line, which will add a cron job to the default crontab. |
|||||||
|
16 | echo "0 0,12 * * * root python -c 'import random; import time; time.sleep(random.random() * 3600)' \ |
||||||
| 17 | && certbot renew" | sudo tee -a /etc/crontab > /dev/null |
|||||||
| 18 | 5. Confirm that Certbot worked |
|||||||
| 19 | To confirm that your site is set up properly, visit *https://yourwebsite.com/* in your browser and look for the lock icon in the URL bar. |
|||||||
| 20 | If you want to check that you have the top-of-the-line installation, you can head to https://www.ssllabs.com/ssltest/. |
|||||||