SSL certificate

SSL certificate with certbot

Install certbot

sudo apt update
sudo apt install certbot python3-certbot-apache -y

Run Certbot for your domain

sudo certbot --apache -d example.com

Reload Apache

sudo systemctl reload apache2

Single certificate for multiple subdomains

sudo certbot --apache -d site1.example.com -d site2.example.com

Verify SSL

sudo certbot certificates

Renewal - Let’s Encrypt auto-renews certificates. Check manually:

sudo certbot renew --dry-run