acme.sh 脚本:https证书没有自动更新,手动更新报错。

问答中心分类: OneinStackacme.sh 脚本:https证书没有自动更新,手动更新报错。
豆奶 asked 5 年 ago

问题:https还有5天到期了,说明没有自动更新http证书。

通过命令:crontab -l

发现如下:

*/20 * * * * /sbin/ntpdate pool.ntp.org > /dev/null 2>&1
40 0 * * * "/root/.acme.sh"/acme.sh –cron –home "/root/.acme.sh" > /dev/null

手动执行:"/root/.acme.sh"/acme.sh –cron –home "/root/.acme.sh" 强制更新,但是报错:

报错信息如下:

[2018年 12月 22日 星期六 12:06:25 CST] ===Starting cron===

[2018年 12月 22日 星期六 12:06:25 CST] Renew: ‘www.xxxxx.com’

[2018年 12月 22日 星期六 12:06:26 CST] Multi domain=’DNS:www.xxxxx.com,DNS:*.xxxxx.com’

[2018年 12月 22日 星期六 12:06:26 CST] Getting domain auth token for each domain

[2018年 12月 22日 星期六 12:06:27 CST] Create new order error. Le_OrderFinalize not found. {“type”:”urn:ietfarams:acme:error:malformed”,”detail”:”Error creating new order :: Domain name \”www.xxxxx.com\” is redundant with a wildcard domain in the same request. Remove one or the other from the certificate request.”,”status”: 400}

[2018年 12月 22日 星期六 12:06:27 CST] Please add ‘–debug’ or ‘–log’ to check more details.

[2018年 12月 22日 星期六 12:06:27 CST] See: https://github.com/Neilpang/acme.sh/wiki/How-to-debug-acme.sh

[2018年 12月 22日 星期六 12:06:27 CST] Error renew http://www.xxxxx.com.

[2018年 12月 22日 星期六 12:06:27 CST] ===End cron===

5 Answers
oneinstack answered 5 年 ago

验证失败,可能原因,网站根目录变化,或者变更过域名。。
nginx配置文件删除,重写vhost.sh 绑定域名吧

豆奶 answered 5 年 ago

我的网站目录创建虚拟主机的时候是默认的 data/wwwroot/www.xxxxx.com 不过中途有一天我修改了目录名 xxxxx,然后立马又修改成了www.xxxxx.com   这样也有影响吗?

oneinstack answered 5 年 ago
有影响,建议删除对于nginx配置文件 再重新生成

豆奶 answered 5 年 ago
现在网站目录已经存在,我把网站目录先重命名为其他任意的名,然后删除nginx 中vhost目录下该网站的配置文件,重新走一遍创建虚拟机的流程吗?
 
当前我的https还有几天过期,重新创建虚拟机不影响吧?另外,创建完了nginx配置文件后 我会手动修改一下里面的配置的,比如监听80端口,手机端的域名等。

oneinstack answered 5 年 ago
vhost.sh 绑定写你网站根目录