【问题标题】:How to get certbot docker to generate pems?如何让 certbot docker 生成 pem?
【发布时间】:2021-12-19 15:24:33
【问题描述】:

所以我正在关注本教程how to secure a containerized nod js app。我能够达到他们生成证书的地步。当我运行以下命令docker-compose up --force-recreate --no-deps certbot 时,我遇到了

附加到 certbot certbot |似乎有问题 那个地址。输入电子邮件地址(用于 certbot | 紧急 更新和安全通知) certbot |证书机器人 |证书机器人
|如果你真的想跳过这个,你可以用 certbot 运行客户端 | --register-unsafely-without-email 但您将无法 收到通知 certbot |关于即将到期或撤销 您的证书或 certbot 的问题 |你的 Certbot 安装将导致无法续订。证书机器人 | 证书机器人 | (输入'c'取消):将调试日志保存到 /var/log/letsencrypt/letsencrypt.log certbot |意外 发生错误:certbot | EOFError 证书机器人 |寻求帮助或 在https://community.letsencrypt.org 搜索解决方案。见 logfile /var/log/letsencrypt/letsencrypt.log 或使用 -v 重新运行 Certbot 更多细节。 certbot 以代码 1 退出

docker-compose.yml 中的命令如下。 command: certonly --webroot --webroot-path=/var/www/html --email sammy@example.local --agree-tos --no-eff-email --register-unsafely-without-email --force-renewal -d example.local -d www.example.local 您可以看到 --register-unsafely-without-email

对nginx.conf进行必要的调整后,webserver出现错误

nginx:[emerg] 无法加载证书“/etc/letsencrypt/live/example.local/fullchain.pem”

然后我注释掉了新添加的 nginx.conf 上下文。然后我进入 webserver 容器检查 live 文件夹是否存在。毫无疑问,/etc/letsencrypt 中没有文件夹。

有什么解决方案可以让这个命令工作?

  • 我只需要这个用于本地开发,所以保持简单是理想的。
  • 我确实需要 SSH。

【问题讨论】:

    标签: docker nginx ssh docker-compose certbot


    【解决方案1】:

    发现问题。

    证书机器人 |服务器不会为 标识符 :: 创建新订单时出错 :: 无法为 “example.local”:域名不以有效的公共后缀结尾 (TLD) (还有 1 个问题。请参阅子问题了解更多信息 信息。)

    Certbot must have public domain

    【讨论】:

      猜你喜欢
      • 2021-03-01
      • 1970-01-01
      • 2020-02-10
      • 2019-08-30
      • 1970-01-01
      • 2021-02-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多