Certbot或Let's Encrypt将多余的“ .com”添加到域

问题描述

我的服务器具有多个域。 certbot对于其中所有功能都适用,但其中之一除外。 让我们以“ blog.domain.staging.com”为例来解决这个问题。

certbot certonly -t -n --dry-run --agree-tos --renew-by-default --email "${LE_EMAIL}" --webroot -w /usr/share/Nginx/html -d blog.domain.staging.com
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator webroot,Installer None
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for blog.domain.staging.com
Using the webroot path /usr/share/Nginx/html for all unmatched domains.
Waiting for verification...
Cleaning up challenges
Failed authorization procedure. blog.domain.staging.com (http-01): urn:ietf:params:acme:error:connection :: The server Could not connect to the client to verify the domain :: Fetching https://blog.domain.staging.com.com/.well-kNown/acme-challenge/YWnMAB2mDZFl4-tEO1BCrKc3vP6yeAL2JVZP-A-BRV4: Error getting validation data

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

   Domain: blog.domain.staging.com
   Type:   connection
   Detail: Fetching
   https://blog.domain.staging.com.com/.well-kNown/acme-challenge/YWnMAB2mDZFl4-tEO1BCrKc3vP6yeAL2JVZP-A-BRV4:
   Error getting validation data

   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. Additionally,please check that
   your computer has a publicly routable IP address and that no
   firewalls are preventing the server from communicating with the
   client. If you're using the webroot plugin,you should also verify
   that you are serving files from the webroot path you provided.

您可以看到主机名还有其他“ .com”,但我不知道为什么以及如何解决

解决方法

nginx配置中有错字。从http重定向到https的链接带有附加的“ .com”。那是问题。