Nginx 在Chef服务器上安装Lets Encrypt

Nginx 在Chef服务器上安装Lets Encrypt,nginx,chef-infra,lets-encrypt,Nginx,Chef Infra,Lets Encrypt,我想在我的Chef服务器上安装Letsencrypt证书。我接着说: 但这导致绑定到端口80时出现问题:无法绑定到IPv4或IPv6。,因此我必须更改服务器允许端口80上通信的配置。感谢我创建了/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[

我想在我的Chef服务器上安装Letsencrypt证书。我接着说:

但这导致绑定到端口80时出现问题:无法绑定到IPv4或IPv6。,因此我必须更改服务器允许端口80上通信的配置。感谢我创建了
/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服务器获取Letsencrypt证书?

您最初尝试的--standalone标志会在端口80上生成certbot自己的服务器。此操作失败,因为您在端口80上侦听了其他内容。如果这是您的chef服务器,一个选项是禁用它在端口80上侦听(可能暂时停止服务器),或者将其非ssl端口移动到其他端口,即8000

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


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

我关闭了所有与chef相关的进程并重新启动了letsencrypt。一个肮脏的解决办法,但我能得到的最好的。
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'