当我试图执行命令为以下内容添加“让我们加密SSL证书”时,我将收到一个错误。你能帮我纠正一下这个问题吗?
命令在服务器上运行以激活LetsEncript SSL证书
sudo certbot run -a webroot -i apache -w /var/www/html -d service.domain1.com --debug-challenges错误消息
Invalid response from
http://service.domain1.com/.well-known/acme-challenge/xWsuGIi0JmuEuDzS5qPkVX3oHuzY2kNl0YGoU6HltRg
[35.186.238.101]: "<!doctype html><html lang=\"en\"><head><meta
http-equiv=\"content-type\"
content=\"text/html;charset=utf-8\"><meta name=\"viewport\" con"--在运行命令后,我将包含完整的消息
ubuntu@ip-10-0-0-55:~$ sudo certbot run -a webroot -i apache -w /var/www/html -d service.domain1.com --debug-challenges
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator webroot, Installer apache
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for service.domain1.com
Using the webroot path /var/www/html for all unmatched domains.
Waiting for verification...
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Challenges loaded. Press continue to submit to CA. Pass "-v" for more info about
challenges.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Press Enter to Continue
Cleaning up challenges
Failed authorization procedure. service.domain1.com (http-01): urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://service.domain1.com/.well-known/acme-challenge/xWsuGIi0JmuEuDzS5qPkVX3oHuzY2kNl0YGoU6HltRg [35.186.238.101]: "<!doctype html><html lang=\"en\"><head><meta http-equiv=\"content-type\" content=\"text/html;charset=utf-8\"><meta name=\"viewport\" con"
IMPORTANT NOTES:
- The following errors were reported by the server:
Domain: service.domain1.com
Type: unauthorized
Detail: Invalid response from
http://service.domain1.com/.well-known/acme-challenge/xWsuGIi0JmuEuDzS5qPkVX3oHuzY2kNl0YGoU6HltRg
[35.186.238.101]: "<!doctype html><html lang=\"en\"><head><meta
http-equiv=\"content-type\"
content=\"text/html;charset=utf-8\"><meta name=\"viewport\" con"
To fix these errors, please make sure that your domain name was
entered correctly and the DNS A/AAAA record(s) for that domain
contain(s) the right IP address.发布于 2021-04-15 23:05:22
要修复这些错误,请确保您的域名输入正确,并且该域的DNS A/AAAA记录包含正确的IP地址。
我想说,您还没有为您的域添加正确的DNS设置。它将给你一些A记录,以添加和指向他们的IP。
你能做的就是得到一个副本-- acme-dns-certbot。
wget https://github.com/joohoi/acme-dns-certbot-joohoi/raw/master/acme-dns-auth.py
下载后,将脚本更改为可执行文件。
chmod +x acme auth.py
更改脚本的第一行以使用python3
纳米acme-dns-auth.py #!/usr/bin/env python3
最后,将脚本移动到Certbot --让我们加密目录,以便Certbot可以加载它
sudo mv acme auth.py /etc/letsencrypt/
现在运行Certbot并强制它使用DNS验证颁发证书。这将运行acme-dns-certbot脚本并触发初始设置过程。
sudo certbot certonly -手动-auth钩子/etc/letsencrypt/acme- dns -auth.py -首选-挑战dns- -d *. -d您的域
您使用--手动参数来禁用Certbot的所有自动集成功能。在这种情况下,您只是颁发一个原始证书,而不是在服务上自动安装它。
您将Certbot配置为通过--手动-auth-钩子参数使用acme-dns-certbot钩子。您运行--首选-挑战性参数,这样Certbot将优先考虑DNS验证。
您还必须告诉Certbot在尝试验证证书之前暂停,这是使用--debug-挑战性参数执行的。这是为了允许您设置acme- DNS -certbot所需的dns CNAME记录,该记录将在本步骤后面讨论。如果没有--调试-挑战参数,Certbot不会暂停,因此您将没有时间进行所需的DNS更改。
请记住使用-d参数替换您希望使用的每个域名。如果要发出通配符证书,请确保用反斜杠()转义星号(*)。
在完成此操作之后,您将看到类似的消息。
...来自acme auth.py的输出:请将以下CNAME记录添加到您的主DNS区域:_acme-质询.您的域CNAME a15ce5b2-f170-4c91-97bf-09a5764a88f6.auth.acme-dns.io.
正在等待验证.....。
将DNS设置添加到您的域中,然后继续,您应该可以看到以下内容:
...祝贺你!您的证书和链已保存在: /etc/letsencrypt/live/your-domain/fullchain.pem您的密钥文件保存在:/etc/letsencrypt/live/ Your domain/Privkey.pem.
https://stackoverflow.com/questions/63919132
复制相似问题