Generate and install SSL certifcate using Certbot:
- Install Certbot from FreeBSD ports and install python:
cd /usr/ports/security/py-certbot
make install clean
cd /usr/ports/lang/python
make install clean - Generate a free SSL
certbot certonly --webroot - Enter the web root and hostname for certificate
- Make change to Apache configration and restart Apache
- Add the following command to cron and run once a day
/usr/local/bin/python -c 'import random; import time; time.sleep(random.random() * 3600)' && /usr/local/bin/certbot renew
Uninstall an existing SSL certicate generated by Certbot:
certbot delete --cert-name ssl.example.com
where ssl.example.com is the sub-domain that need to be removed.