我想在Chef服务器上安装Letsencrypt证书。我跟着this guide:
git clone https://github.com/letsencrypt/letsencrypt
cd letsencrypt
./letsencrypt-auto
./letsencrypt-auto certonly --standalone --email [email protected] -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流量重定向到https,因此仍然无法生成Letsencrypt证书。
如何获取Chef Server的Letsencrypt证书?
您尝试的--standalone标志最初在端口80上生成certbot自己的服务器。这失败了,因为您在端口80上有其他东西正在侦听。如果这是您的主厨服务器,一个选项是禁用它在端口80上侦听(可能会停止服务器)临时)或将其non_ssl_port移动到其他端口,即8000。
如果不是厨师服务器在端口80上侦听,你应该调查它是什么(即,它可能是nginx或apache服务器的实例)。
找到并释放端口80后,您的初始命令集应该起作用并生成证书。