无法使用certbot续订SSL证书

发布于 2025-02-13 08:43:24 字数 1905 浏览 1 评论 0原文

我正在尝试在AWS EC2服务器中续订我的SSL证书,但是我会遇到以下错误,因此经过大量的研究,我找不到解决方案。

我运行的命令:

$ sudo certbot renew --dry-run

错误:

Saving debug log to /var/log/letsencrypt/letsencrypt.log

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Processing /etc/letsencrypt/renewal/mydomain.com.conf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Cert is due for renewal, auto-renewing...
Plugins selected: Authenticator nginx, Installer nginx
Renewing an existing certificate
Performing the following challenges:
http-01 challenge for mydomain.com
Using default addresses 80 and [::]:80 ipv6only=on for authentication.
Waiting for verification...
Challenge failed for domain mydomain.com
http-01 challenge for mydomain.com
Cleaning up challenges
Attempting to renew cert (mydomain.com) from /etc/letsencrypt/renewal/prod-mydomain.conf produced an unexpected error: Some challenges have failed.. Skipping.
All renewal attempts failed. The following certs could not be renewed:
  /etc/letsencrypt/live/mydomain.com/fullchain.pem (failure)

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

All renewal attempts failed. The following certs could not be renewed:
  /etc/letsencrypt/live/mydomain.com/fullchain.pem (failure)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1 renew failure(s), 0 parse failure(s)

IMPORTANT NOTES:
 - The following errors were reported by the server:

   Domain: mydmain.com
   Type:   unauthorized
   Detail: 2.211.168.8: Invalid response from
   http://mydoamin.com/.well-known/acme-challenge/ov6EBHInETwkZZ-oqLNI908jFXvN7PFK86ZCJYcdrtA:
   404

   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.

I'm trying to renew my SSL certificate in my AWS EC2 server, but I'm getting the following error so after a lot of research I couldn't find the solution.

The command I run:

$ sudo certbot renew --dry-run

Error:

Saving debug log to /var/log/letsencrypt/letsencrypt.log

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Processing /etc/letsencrypt/renewal/mydomain.com.conf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Cert is due for renewal, auto-renewing...
Plugins selected: Authenticator nginx, Installer nginx
Renewing an existing certificate
Performing the following challenges:
http-01 challenge for mydomain.com
Using default addresses 80 and [::]:80 ipv6only=on for authentication.
Waiting for verification...
Challenge failed for domain mydomain.com
http-01 challenge for mydomain.com
Cleaning up challenges
Attempting to renew cert (mydomain.com) from /etc/letsencrypt/renewal/prod-mydomain.conf produced an unexpected error: Some challenges have failed.. Skipping.
All renewal attempts failed. The following certs could not be renewed:
  /etc/letsencrypt/live/mydomain.com/fullchain.pem (failure)

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

All renewal attempts failed. The following certs could not be renewed:
  /etc/letsencrypt/live/mydomain.com/fullchain.pem (failure)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1 renew failure(s), 0 parse failure(s)

IMPORTANT NOTES:
 - The following errors were reported by the server:

   Domain: mydmain.com
   Type:   unauthorized
   Detail: 2.211.168.8: Invalid response from
   http://mydoamin.com/.well-known/acme-challenge/ov6EBHInETwkZZ-oqLNI908jFXvN7PFK86ZCJYcdrtA:
   404

   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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

莫相离 2025-02-20 08:43:24

在我的情况下,我将默认用作/etc/nginx/sites-sites-enabled文件夹的文件名。将其更改为yoursite.com,您是您的网站地址。 sudo certbot续订 - 直接运行开始工作正常。
也许对某人有帮助:

# Rename file
cd /etc/nginx/sites-enabled
mv ./default ./yoursite.com
# Update certs, don't forget to replace yoursite.com with your address
sudo certbot --nginx -d yoursite.com -d www.yoursite.com
# Check nginx config
nginx -t
# Restart nginx to apply certs
sudo systemctl reload nginx
# Check renew
sudo certbot renew --dry-run

In my case I use default as a filename inside /etc/nginx/sites-enabled folder. After I changed it to yoursite.com, where yoursite.com is you site address. The sudo certbot renew --dry-run started to work fine.
Maybe it helps to somebody:

# Rename file
cd /etc/nginx/sites-enabled
mv ./default ./yoursite.com
# Update certs, don't forget to replace yoursite.com with your address
sudo certbot --nginx -d yoursite.com -d www.yoursite.com
# Check nginx config
nginx -t
# Restart nginx to apply certs
sudo systemctl reload nginx
# Check renew
sudo certbot renew --dry-run
零度° 2025-02-20 08:43:24

如果您刚刚添加了证书,并且正在测试续订过程,则需要重新启动Web服务器以在尝试续订之前激活/应用新证书。

If you have just added the certs and you are testing the renewal process, you will need to restart the webserver to activate/apply the new certs before you attempt to renew.

绿光 2025-02-20 08:43:24

根据给出的错误,您需要确保您试图创建证书的域名指向服务器。

您可能需要a DNS条目mydmain.com指向您的服务器IP。

我相信这就是Letsencrypt确保域名的所有权。
https://letsencrypt.org/getting-started/

Based on the error given, you need to ensure that the domain that you are trying to create the certificate for is pointing to the server.

You probably need a A DNS entry for mydmain.com pointing to your server IP.

I believe this is how LetsEncrypt ensure ownership of the domain.
https://letsencrypt.org/getting-started/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文