Installing secure certificates with CertBot on Slackware...
- Download and install letsencrypt-0.9.3-x86_64-1_microlinux.txz on the server. I think this is the one I downloaded because I see I installed it right before I started doing all my CertBot commands.
installpkg letsencrypt-0.9.3-x86_64-1_microlinux.txz
- Run CertBot.
certbot certonly --manual --preferred-challenges=dns --email sample.email@provider.com
- CertBot requests you 'enter the domain name(s) you would like on your certificate (comma and/or space separated)'. Enter your domain names.
dohnetwork.com *.dohnetwork.com'
- CertBot will return an acme challenge to add to your domain 'named' file.
vi /var/named/<your domain>.com
- Add the challenge as a new row in your 'named' file.
_acme-challenge 300 IN TXT 'value from CertBot in quotes'
- Restart DNS.
rndc reload
- CertBot includes a link to test your challenge before continuing on Google Apps Toolbox. Check there to make sure your challenge is working before continuing.
- If your challenge shows up on Google Apps, press 'Enter' to continue. If all went well, you will be shown the location of the certificate and key 'pem' files and some next steps for renewing your secure certificates in 90 days.
- Open your httpd.conf file.
vi /etc/httpd/httpd.conf
- Search for any instances of 'ssl'.
+/ssl
Press 'n' to move to the next instance. - Make sure
LoadModule ssl_module lib64/httpd/modules/mod_ssl.so
andInclude /etc/httpd/extra/httpd-ssl.conf
are uncommented. - Open Apache's 'httpd-ssl.conf'.
vi /etc/httpd/extra/httpd-ssl.conf
- Look for 'SSLCertificateFile'.
+/SSLCertificateFile
There are two block instances. Mine used the second one. There should be examples. Update the path to the one CertBot gave you.SSLCertificateFile '/etc/letsencrypt/live/dohnetwork.com/fullchain.pem'
- Do the same for the private key that should be in the same area.
SSLCertificateKeyFile '/etc/letsencrypt/live/dohnetwork.com/privkey.pem'
- Check your config.
apachectl configtest
And restart.apachectl restart
- You can go back to step 5 and remove the acme challenge and re-run step 6 to clean up. For some reason, subdomains are not working when secured. I tried setting up a certificate with the subdomains listed out but that didn't work either. Will look into that. How to automate it with a cron job coming soon.