发布于 1年前

更新Let's Encrypt报错:Client with the currently selected authenticator does not support any combination of challenges that will satisfy the CA

在Ubuntu给nginx更新Let's Encrypt的证书

./letsencrypt-auto --nginx --renew-by-default -d <domain name>

报错:

Client with the currently selected authenticator does not support any combination of challenges that will satisfy the CA.

查了一下资料,这是由于TLS-SNI-01 challenge存在安全性问题(具体可以参考:2018.01.09 Issue with TLS-SNI-01 and Shared Hosting Infrastructure),Let‘s Encrypt永久禁用了TLS-SNI-01challenge,所以导致了上面的错误。

解决方法

Let's Encrypt提供了两种解决方法。

1、升级到最新版的Cetbot

Certbot 0.21.0在2018年1月17日发布了,更新certbot到此版本可以解决问题。

注意:使用操作系统的软件包管理软件安装certbot可能还不能获取最新的certbot 0.21.0,建议使用 certbot-auto安装更新。

2、如果想暂时使用旧的cetbot,分两种情况解决此问题。(以nginx为例)

2.1、如果站点的文件放在nginx管理的目录,执行命令:

sudo certbot --authenticator webroot --webroot-path <webroot> --installer nginx -d <domain>

其中webroot为nginx web文件的根目录。

2.2、如果站点的文件不是在nginx管理的目录下,如使用proxy_pass代理分发,执行命令:

sudo certbot --authenticator standalone --installer nginx -d <domain> --pre-hook "service nginx stop" --post-hook "service nginx start"

此命令会通过--pre-hook暂时关闭nginx,成功后通过--post-hook启动nginx

如果web服务器为apache,只需要把命令 --installer nginx改为--installer apache

©2020 edoou.com   京ICP备16001874号-3