sudo add-apt-repository ppa:certbot/certbot
Install CertBot's Apache package:
sudo apt install python-certbot-apache
Make sure you have a server block for your domain:
sudo nano /etc/apache2/sites-available/example.com.conf
Reload Apache:
sudo systemctl reload apache2
Check firewall status:
sudo ufw status
After firewall has been confirmed enabled, configured, add rules:
sudo ufw allow 'Apache Full'
sudo ufw delete allow 'Apache'
Should at least have the following rules:
Status: active
To Action From
-- ------ ----
OpenSSH ALLOW Anywhere
Apache Full ALLOW Anywhere
OpenSSH (v6) ALLOW Anywhere (v6)
Apache Full (v6) ALLOW Anywhere (v6)
Use Apache CertBot plugin to create & install certificate, keys:sudo certbot --apache -d example.com -d www.example.com
Test auto-renew:
sudo certbot renew --dry-run
Comments