SSL 证书一键申请

# 安装 Certbot
apt install certbot python3-certbot-nginx -y

# 申请证书(Nginx 模式)
certbot --nginx -d example.com -d www.example.com

# 续期测试
certbot renew --dry-run

# 查看证书状态
certbot certificates

# 自动续期(系统自动添加定时任务)
# 续期记录查看
grep Certbot /var/log/letsencrypt/letsencrypt.log