【问题标题】:Letsencrypt + nginx + autorenewal + Infrastructure as code?Letsencrypt + nginx + 自动更新 + 基础设施即代码?
【发布时间】:2018-07-20 19:50:59
【问题描述】:

我们的基础设施由 Ansible 管理(包括 nginx 站点配置 - 它们是使用模板生成的)。

现在我们每 3 个月通过certbot 命令自动生成letsencrypt 证书,但是我们有大约1 分钟的停机时间(我们必须停止nginx,才能将certbot 绑定到80)。

如何进行自动更新的 Letsencrypt + nginx 集成?那么通配符呢?

我找到了一些解决方案,例如 How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SLL rating),但他们使用 python-certbot-nginx 修改站点配置(并且它们将在下一次 Ansible 运行时被 Ansible 替换,因此 HTTPS 将被破坏)。

【问题讨论】:

标签: ssl nginx ansible lets-encrypt ubuntu-18.04


【解决方案1】:

最好的选择是使用 DNS certbot 插件。

  1. 您不需要绑定端口。
  2. 在创建第一个 letsencript 证书之前,您无需为首次启动的 nginx 生成自签名证书。
  3. 通配符。

【讨论】:

    猜你喜欢
    • 2021-01-25
    • 2020-08-27
    • 2016-05-22
    • 2021-06-27
    • 2021-04-19
    • 2019-08-10
    • 2020-03-15
    • 2020-01-17
    • 2016-04-26
    相关资源
    最近更新 更多