使用 Certbot 管理多域名证书的实践与清理流程
在维护服务器过程中,经常需要为多个主域名和子域名申请和更新 SSL 证书。Let’s Encrypt 提供了免费证书,而 Certbot 是其官方推荐的客户端,支持自动签发、续期和管理。 以下记录一次在 Linux 服务器上管理多证书、删除旧证书的完整流程。 多域名证书申请 通过 Certbot 的 standalone 模式申请多域名证书,可一次性覆盖主域和多个子域,例如: certbot certonly –standalone \ -d example.net \ -d www.example.net \ -d mail.example.net \ -d app1.example.net \ -d app2.example.net \ -d app3.example.net \ -d app4.example.net \ -d app5.example.net \ -d app6.example.net \ -d app7.example.net \ …