【问题标题】:Install Lets Encrypt on Chef Server在 Chef 服务器上安装 Lets Encrypt
【发布时间】:2023-03-15 00:05:01
【问题描述】:

我想在我的 Chef 服务器上安装 Letsencrypt 证书。我关注了this guide:

git clone https://github.com/letsencrypt/letsencrypt
cd letsencrypt
./letsencrypt-auto
./letsencrypt-auto certonly --standalone --email your-email@email-service.com -d chefserver.DOMAIN.com

但这导致Problem binding to port 80: Could not bind to IPv4 or IPv6.,所以我不得不更改我的服务器允许端口80上的流量的配置。感谢this answer我创建了/etc/opscode/chef-server.rb:

nginx['non_ssl_port'] = 80
nginx['ssl_port'] = 443
nginx['enable_non_ssl'] = true
nginx['x_forwarded_proto'] = 'http'
nginx['url'] = 'http://chef.mydomain.com'

运行chef-server-ctl reconfigure后发现/etc/opscode/chef-server-running.json已经改了。

但是服务器仍然将我的 http-traffic 重定向到 https,所以仍然无法生成 Letsencrypt 证书。

如何获得我的 Chef 服务器的 Letsencrypt 证书?

【问题讨论】:

    标签: nginx chef-infra lets-encrypt


    【解决方案1】:

    您最初尝试的 --standalone 标志在端口 80 上生成 certbot 自己的服务器。这失败了,因为您在端口 80 上侦听了其他东西。如果那是您的厨师服务器,一个选项是禁用它在端口 80 上侦听(也许暂时停止服务器)或将其 non_ssl_port 移动到其他端口,即 8000。

    如果不是 Chef 服务器在端口 80 上侦听,您应该调查它是什么(即,它可能是 nginx 或 apache 服务器的实例)。

    找到并释放端口 80 后,您的初始命令集应该可以工作并生成证书。

    【讨论】:

    • 我杀死了所有与厨师相关的进程并重新启动了letsencrypt。一个肮脏的解决方法,但我能得到最好的。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-03-01
    • 2023-03-11
    • 1970-01-01
    相关资源
    最近更新 更多