apache - 是否可以在不重新启动它们的情况下为 Apache 和电子邮件服务更新证书?

标签 apache email dovecot lets-encrypt

我正在为我的域部署新证书,以便在 Web 和电子邮件服务上使用。为此,我正在使用 Certbot,这是一个创建和更新 Let's Encrypt 证书的程序。

我看到的每个教程都需要重新启动 Web (apache) 或电子邮件服务 (dovecot)。

有谁知道如何为 apache 或 dovecot 部署新证书并在不重新启动的情况下开始使用它?

最佳答案

certbot 文档描述了一种使用 webroot 插件无需重新启动网络服务器即可获得证书的方法:https://certbot.eff.org/docs/using.html#webroot

总而言之,您需要向 certbot 命令传递一些额外参数以进行续订:certonly--webroot--webroot -path-w。所以完整的命令看起来像这样:

certbot renew certonly --webroot -w /var/www/example/ -d www.example.com

根据文档:

The webroot plugin works by creating a temporary file for each of your requested domains in ${webroot-path}/.well-known/acme-challenge. Then the Let’s Encrypt validation server makes HTTP requests to validate that the DNS for each requested domain resolves to the server running certbot.

这允许 Let's Encrypt 执行域验证,而无需停止 Apache 绑定(bind)到端口 80、443 等。

关于apache - 是否可以在不重新启动它们的情况下为 Apache 和电子邮件服务更新证书?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38312901/

相关文章:

centos6 - 合并两个 dovecot Maildirs

mysql - 为什么在MySQL(邮件服务器)中创建电子邮件后无法访问?

php - 默认情况下 Apache 2 gzip json 输出吗?

javascript - 当前目录的 404 重定向工作

ruby-on-rails - 如何自定义 Mailboxer 电子邮件主题?

email - 如何使用 CakePHP 在后台发送电子邮件?

ssl - 如何使用 zpanel 正确设置 ssl 和安装 postfix

apache - 无法设置 SSL 以使用 MAMP 5.3

javascript - 如何阻止用户使用 javascript 链接

Python 谷歌应用引擎 : Send Mail Error