今晚在利用1Panel给域名申请证书的时候遇到一点错误,导致反复测试都不可行,一直报错,以前明明很顺利的一键操作,现在反复多次都不可以,我以为是Let’s Encrypt的服务器问题就尝试以ZeroSSL去申请还是报错 ,提示如下:(域名的DNS放在CloudFlare的)

2024/01/30 04:12:17 开始申请证书,域名 [rupu.net] 申请方式 [DNS 自动] DNS 账号 [CF] 厂商 [CloudFlare]
2024/01/30 04:12:17 [INFO] [rupu.net] acme: Obtaining bundled SAN certificate
2024/01/30 04:12:18 [INFO] [rupu.net] AuthURL: https://acme-v02.api.letsencrypt.org/acme/authz-v3/309475*****6
2024/01/30 04:12:18 [INFO] [rupu.net] acme: Could not find solver for: tls-alpn-01
2024/01/30 04:12:18 [INFO] [rupu.net] acme: Could not find solver for: http-01
2024/01/30 04:12:18 [INFO] [rupu.net] acme: use dns-01 solver
2024/01/30 04:12:18 [INFO] [rupu.net] acme: Preparing to solve DNS-01
2024/01/30 04:12:19 [INFO] [rupu.net] acme: Cleaning DNS-01 challenge
2024/01/30 04:12:20 [WARN] [rupu.net] acme: cleaning up failed: cloudflare: failed to find zone rupu.net.: zone could not be found 
2024/01/30 04:12:21 [INFO] Deactivating auth: https://acme-v02.api.letsencrypt.org/acme/authz-v3/309475*****6
2024/01/30 04:12:21 申请  [rupu.net] 证书失败, error: one or more domains had a problem:
[rupu.net] [rupu.net] acme: error presenting token: cloudflare: failed to find zone rupu.net.: zone could not be found

反复尝试多次,无论是换证书厂商还是单个域名申请还是通配符申请都没用,同样的问题在官方网站提示的说的是域名要给”全局API 秘钥”,但是我明明给的就是给的’全局API秘钥’还是报错,我尝试一下反其道而行之,只给部分权限的’API 令牌’,没想到奇迹出现了,反而可以了。在此记录一下,也给遇到同样问题的朋友一个方法或者思路。

进入CloudFlare API 令牌 设置界面,为其需要的域名单独设置’API 令牌’,如图:

再次申请证书就Ok了

2024/01/30 03:40:22 开始申请证书,域名 [rupu.net,*.rupu.net] 申请方式 [DNS 自动] DNS 账号 [CF] 厂商 [CloudFlare]
2024/01/30 03:40:22 [INFO] [rupu.net, *.rupu.net] acme: Obtaining bundled SAN certificate
2024/01/30 03:40:23 [INFO] [*.rupu.net] AuthURL: https://acme-v02.api.letsencrypt.org/acme/authz-v3/309*******6
2024/01/30 03:40:23 [INFO] [rupu.net] AuthURL: https://acme-v02.api.letsencrypt.org/acme/authz-v3/309******6
2024/01/30 03:40:23 [INFO] [*.rupu.net] acme: use dns-01 solver
2024/01/30 03:40:23 [INFO] [rupu.net] acme: Could not find solver for: tls-alpn-01
2024/01/30 03:40:23 [INFO] [rupu.net] acme: Could not find solver for: http-01
2024/01/30 03:40:23 [INFO] [rupu.net] acme: use dns-01 solver
2024/01/30 03:40:23 [INFO] [*.rupu.net] acme: Preparing to solve DNS-01
2024/01/30 03:40:26 [INFO] cloudflare: new record for rupu.net, ID 86a87b1a5e1e****************5dd5
2024/01/30 03:40:26 [INFO] [rupu.net] acme: Preparing to solve DNS-01
2024/01/30 03:40:27 [INFO] cloudflare: new record for rupu.net, ID 4c87757cd375****************4346
2024/01/30 03:40:27 [INFO] [*.rupu.net] acme: Trying to solve DNS-01
2024/01/30 03:40:27 [INFO] [*.rupu.net] acme: Checking DNS record propagation using [127.0.0.53:53]
2024/01/30 03:40:32 [INFO] Wait for propagation [timeout: 1h0m0s, interval: 5s]
2024/01/30 03:40:39 [INFO] [*.rupu.net] The server validated our request
2024/01/30 03:40:39 [INFO] [rupu.net] acme: Trying to solve DNS-01
2024/01/30 03:40:39 [INFO] [rupu.net] acme: Checking DNS record propagation using [127.0.0.53:53]
2024/01/30 03:40:44 [INFO] Wait for propagation [timeout: 1h0m0s, interval: 5s]
2024/01/30 03:40:44 [INFO] [rupu.net] acme: Waiting for DNS record propagation.
2024/01/30 03:40:50 [INFO] [rupu.net] The server validated our request
2024/01/30 03:40:50 [INFO] [*.rupu.net] acme: Cleaning DNS-01 challenge
2024/01/30 03:40:51 [INFO] [rupu.net] acme: Cleaning DNS-01 challenge
2024/01/30 03:40:52 [INFO] [rupu.net, *.rupu.net] acme: Validations succeeded; requesting certificates
2024/01/30 03:40:53 [INFO] [rupu.net] Server responded with a certificate.
2024/01/30 03:40:53 申请 [rupu.net,*.rupu.net] 证书成功!!
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。