![尝试设置 haproxy letsencrypt 以终止 SSL。网关未应答 DNS](https://linux22.com/image/737286/%E5%B0%9D%E8%AF%95%E8%AE%BE%E7%BD%AE%20haproxy%20letsencrypt%20%E4%BB%A5%E7%BB%88%E6%AD%A2%20SSL%E3%80%82%E7%BD%91%E5%85%B3%E6%9C%AA%E5%BA%94%E7%AD%94%20DNS.png)
尝试使用 letsencrypt 设置 ssl 终止,但 dns 出现了一些异常。我正在将 tcp 路由到现有主机,以允许 adomain.com 上的网站管理自己的证书,直到代理可以无错误地进行 --dry-run。
这是我的 haproxy.conf:
frontend http-frontend
bind *:80
timeout client 1m
mode http
default_backend letsencrypt-backend
frontend https-frontend
bind *:443
timeout client 2m
option tcplog
mode tcp
acl is_knight hdr_end(host) -i adomain.com
acl is_oer hdr_end(host) -i adifferentdomain.com
default_backend knight
backend letsencrypt-backend
mode http
timeout server 1m
server letsencrypt 127.0.0.1:8888
backend knight
timeout server 1m
mode tcp
server knightwww 192.168.0.2:443
我正在尝试获取 SSL 证书
sudo certbot certonly --standalone -d adomain.com -d knight.jr1.ca --non-interactive --agree-tos --email [email protected] --http-01-port=8888 --dry-run
响应是
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='acme-staging-v02.api.letsencrypt.org', port=443): Max retries exceeded with url: /directory (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f813819fb00>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',))
这让我很担心,所以我做了一个测试叶DNS
The parent nameservers do not have your nameservers listed
This means the name does not exist or your registrar is experiencing technical difficulties.
我刚刚检查了列出的名称服务器,它们包含指向网关公共 IP 地址的 A 记录
我错过了什么?
答案1
这是由于某些内容覆盖了 /etc/resolve.conf 而导致的。经过一番寻找,答案如下: