【发布时间】:2020-05-02 16:58:24
【问题描述】:
在我的服务器上安装了 certbot。除了 WSGI 服务的 Django 应用程序之外,它对所有服务器都很好。
当我用sudo certbot renew 更新证书时,它说挑战没有完成。我的网站根是/srv/site。不知何故,certbot 知道它需要在static/.well-known/acme-challenge 中提出挑战。 (不知道它是怎么知道的,但确实是正确的)。
如果我自己创建这个文件夹,并在其中放置一个文件“hello”,我可以通过转到www.site.com/static/.well-known/acme-challenge/hello 来检索它。那么为什么 letencrypt 不能访问它所带来的挑战呢?
它似乎没有创建这个文件。甚至不是文件夹结构,尽管以 root 身份运行并且能够创建它喜欢的任何文件夹。我正在使用watch -n 0.5 ls -a /srv/site/static 来查看是否创建了 .well-known 文件夹,但它没有。
为什么?
完全错误:
user@host:/srv/site$ sudo certbot renew
Saving debug log to /var/log/letsencrypt/letsencrypt.log
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Processing /etc/letsencrypt/renewal/domain.tld.conf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Cert is due for renewal, auto-renewing...
Plugins selected: Authenticator webroot, Installer None
Renewing an existing certificate
Performing the following challenges:
http-01 challenge for site.domain.tld
Waiting for verification...
Cleaning up challenges
Attempting to renew cert (site.tld) from /etc/letsencrypt/renewal/domain.tld.conf produced an unexpected error: Failed authorization procedure. site.domain.tld (http-01): urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from https://site.domain.tld/static/.well-known/acme-challenge/yD-WpiQsGL1E_fvs2m-U6UDuHdLCh6shuJkmUdIzhXs [139.162.191.205]: "<!doctype html>\n<html lang=\"en\">\n<head>\n<link href=\"https://fonts.googleapis.com/icon?family=Material+Icons\" rel=\"stylesheet\">\n<". Skipping.
All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/domain.tld/fullchain.pem (failure)
【问题讨论】:
标签: lets-encrypt certbot