xdtianyu / scripts

scripts for work
https://www.xdty.org
1.03k stars 245 forks source link

cloudxns已接管./le-cloudxns.sh cloudxns.conf依然报错 #37

Closed ikingi closed 7 years ago

ikingi commented 7 years ago

修改 DOMAIN 为你的根域名 (我修改成***.ml)还是报ERROR CONFIG. 这样的错误。

1 2 3 wenjiancuowu

xdtianyu commented 7 years ago
API_KEY="YOUR_API_KEY"
SECRET_KEY="YOUR_SECRET_KEY"
DOMAIN="example.com"
CERT_DOMAINS="example.com www.example.com im.example.com"
#ECC=TRUE

修改 DOMAIN 为你的根域名,修改 CERT_DOMAINS 为您要签的域名列表

ikingi commented 7 years ago

DOMAIN="*****.ml" 我也这么修改了。。但是还是同样的错误。

xdtianyu commented 7 years ago

请把你完整的 conf 文件内容贴出来吧

ikingi commented 7 years ago

大佬,有联系方式吗。。。。

xdtianyu commented 7 years ago

ERROR CONFIG. 这个错误是找不到配置文件的提示,请 cat cloudxns.conf 看看有没有这个文件及内容是否正确,另外你上文截图里的配置明显不对, DOMAIN 为什么会是路径地址?

alstarking commented 7 years ago

已解决。谢谢大佬。正常申请证书报错应该是lnmp1.3的Nginx默认是访问不到.well-known/acme-challenge,将Nginx的 location ~ /. { deny all; } 修改成 location ~ /.well-known { allow all; }

就解决了。。刚装了lnmp1.4测试版,这个问题已经不存在了。。lnmp1.4里已经默认加入了/.well-known

xdtianyu commented 7 years ago

感谢反馈~

jameqq commented 7 years ago

@alstarking lnmp1.3的Nginx的默认配置在哪 我改了还是不行

ikingi commented 7 years ago

@tang1989324 /usr/local/nginx/conf/vhost/**.conf

hifer commented 7 years ago

ValueError: Wrote file to /data/frontend/.well-known/acme-challenge/VR99TFl4_cSituBUJ310UgeHpS9fwC4oB5GKvjh7LGc, but couldn't download http://test.cscec3b.com.cn/.well-known/acme-challenge/VR99TFl4_cSituBUJ310UgeHpS9fwC4oB5GKvjh7LGc [root@localhost certs]# ll /data/frontend/.well-known/acme-challenge/VR99TFl4_cSituBUJ310UgeHpS9fwC4oB5GKvjh7LGc -rw-r--r--. 1 root root 87 May 19 13:26 /data/frontend/.well-known/acme-challenge/VR99TFl4_cSituBUJ310UgeHpS9fwC4oB5GKvjh7LGc

大神,这个文件写进去了 但是还是报down不下来

xdtianyu commented 7 years ago

@hifer 试下手动新建个文件在浏览器打开,下载不下来就说明 web 服务器配置有问题

hifer commented 7 years ago

手动在浏览器上是能下载下来的,您可以直接下一些这个,我还没删掉 http://test.cscec3b.com.cn/.well-known/acme-challenge/VR99TFl4_cSituBUJ310UgeHpS9fwC4oB5GKvjh7LGc 我把Python删除代码注释掉了,就是想确认下这个

xdtianyu commented 7 years ago

@hifer 可以再试下,可能是 le 的服务器访问国内托管的文件时下载失败了

hifer commented 7 years ago

@xdtianyu Generate CSR...test.csr Parsing account key... Parsing CSR... Registering account... Traceback (most recent call last): File "/tmp/acme_tiny.py", line 198, in main(sys.argv[1:]) File "/tmp/acme_tiny.py", line 194, in main signed_crt = get_crt(args.account_key, args.csr, args.acme_dir, log=LOGGER, CA=args.ca) File "/tmp/acme_tiny.py", line 92, in get_crt raise ValueError("Error registering: {0} {1}".format(code, result)) ValueError: Error registering: 500 { "type": "urn:acme:error:serverInternal", "detail": "Failed to get registration by key", "status": 500 }

xdtianyu commented 7 years ago

@hifer 这个 500 错误是 le 服务器返回的。如果是使用的 cloudxns 托管的 dns,也可以试试用 dns 验证的方式签发证书 https://github.com/xdtianyu/scripts/tree/master/le-dns

hifer commented 7 years ago

@xdtianyu 好的,等会试下,多谢了