Generate SSL cert Let's Encrypt - certbot
-
# apt install certbot python3-certbot-nginx # certbot --nginx -d example.com -d www.example.com
Certbot will modify nginx /site-available/default file, and append the 443 entry.
It also will install certbot's service for auto renew.
# systemctl status certbot.timer
To test the auto-renew.
certbot renew --dry-run