【发布时间】:2022-01-21 05:27:25
【问题描述】:
我是网络新手,我需要向负载均衡器添加 SSL 证书。为此,我正在使用 Certbot。
说明:https://certbot.eff.org/instructions?ws=haproxy&os=ubuntufocal
基本上它说使用 SSH 登录到服务器,然后安装 certbot
然后,运行这个命令
sudo certbot certonly --standalone
它告诉我暂时停止我的网络服务器以获取证书,所以我运行了:
sudo service ssh stop
运行 certbot 命令后出现以下错误:
Could not bind TCP port 80 because it is already in use by another process on
this system (such as a web server). Please stop the program in question and then
try again.
所以我跑了:
sudo netstat -tulpn | grep :80
输出:
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 59283/nginx: master
tcp6 0 0 :::80 :::* LISTEN 59283/nginx: master
现在,如果我使用“sudo service nginx stop”停止 nginx 服务并再次运行上述命令,我没有得到任何服务在端口 80 中侦听。所以我再次重试 Certbot 命令:
sudo certbot certonly --standalone
我收到以下错误:
Certbot failed to authenticate some domains (authenticator: standalone). The Certificate Authority reported these problems:
Domain: totaldomainoftheworldclub.tech
Type: dns
Detail: no valid A records found for totaldomainoftheworldclub.tech; no valid AAAA records found for totaldomainoftheworldclub.tech
Hint: The Certificate Authority failed to download the challenge files from the temporary standalone webserver started by Certbot on port 80. Ensure that the listed domains point to this machine and that it can accept inbound connections from the internet.
就是这样,我不知道还能做什么。
【问题讨论】:
-
“它告诉我暂时停止我的 Web 服务器以获取证书,所以我运行:sudo service ssh stop” - 当你被问到时,你正在停止 SSH 服务器停止网络服务器?
-
是的,我试过了,以防万一。我实际上停止了nginx服务,这是停止Web服务器的方式吗?停止 nginx 后,我收到最后一条错误消息