我刚收到一封电子邮件,上面写着:
Beginning June 1, 2020, we will stop allowing new domains to validate using
the ACMEv1 protocol. You should upgrade to an ACMEv2 compatible client before
then, or certificate issuance will fail. For most people, simply upgrading to
the latest version of your existing client will suffice.我在Debian 9上做了以下升级:
在试运行过程中,我得到了以下几个错误(一些项目已经由我编辑,因为我不确定在这里发布是否是敏感信息):
Attempting to renew cert (mail.example.com) from /etc/letsencrypt/renewal/mail.example.com.conf produced an unexpected error: Failed authorization procedure. mail.example.com (http-01): urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://mail.example.com/.well-known/acme-challenge/REDACTED_STRING_EXAMPLE [REDACTED HEXADECIMAL ADDRESS]: "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n<html><head>\n<title>404 Not Found</title>\n</head><body>\n<h1>Not Found</h1>\n<p". Skipping.和
The following errors were reported by the server:
Domain: mail.example.com
Type: unauthorized
Detail: Invalid response from
http://mail.example.com/.well-known/acme-challenge/REDACTED CODE
[REDACTED HEXADECIMAL ADDRESS]: "<!DOCTYPE HTML PUBLIC
\"-//IETF//DTD HTML 2.0//EN\">\n<html><head>\n<title>404 Not
Found</title>\n</head><body>\n<h1>Not Found</h1>\n<p"
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.是什么引起了这个问题?我的根目录中没有一个.众所熟知的目录。这是我需要补充的新要求吗?如果是的话,我可以做什么来修复我的certbot,以便我可以正确地更新我的证书?
发布于 2020-03-29 09:28:04
因此,正如我所看到的,您正在使用Apache,我认为它被错误地配置为正确地服务于ACME挑战。
certbot正在做的是创建.well-known/acme-challenge/文件夹,然后将其添加到网站的Apache配置中(这里是mail.example.com)。所以我猜:
mail.example.com配置(/etc/apache2)。您可以使用类似于apachectl -t -D DUMP_VHOSTS的东西转储所有当前的活动配置。mail.example.com配置,特别是:80部分,certbot将在其中尝试插入代码。我认为这里有一个问题,因为certbot无法使.well-known文件夹可用(通过HTTP,端口80)。检查配置中的<Directory>标记,以了解Apache重定向通信量的位置。
发布于 2020-03-30 01:25:31
有时自动验证失败,特别是在配置到位的情况下。如果尚未完成,请查看面向HTTP-01挑战的certbot文档。重要部分
当使用Webroot插件或手动插件时,请确保存在webroot目录并正确地指定它。如果您将/var/www/example.com/.well-known/acme-challenge/testfile的webroot目录设置为/var/www/example.com,那么放置在example.com中的文件应该出现在http://example.com/.well-known/acme-challenge/testfile的网站上(重定向到HTTPS是可以的,不应该阻止挑战的工作)。 确保您的web服务器能够正确地从质询文件所在的目录(如/.众所知/acme-质询)向网站上的预期位置提供文件,而无需添加页眉或页脚。
本教程描述了如何允许apache服务器中的acme请求。
简言之:
为了简单起见,您可以将所有HTTP请求映射到一个目录/var/lib/letsencrypt。为此,您应该事先创建目录。
sudo mkdir -p /var/lib/letsencrypt/.well-known
sudo chgrp www-data /var/lib/letsencrypt
sudo chmod g+s /var/lib/letsencrypt然后,为了确保文件夹是可访问的,可以使用以下配置片段
Alias /.well-known/acme-challenge/ "/var/lib/letsencrypt/.well-known/acme-challenge/"
<Directory "/var/lib/letsencrypt/">
AllowOverride None
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
Require method GET POST OPTIONS
</Directory>https://stackoverflow.com/questions/60748579
复制相似问题