0

我不得不暂停我的开发几个月。我的 Letsencrypt 证书同时过期,并且库中有一些变化。我删除了我的 Letsencrypt 目录(里面有证书的那个)。我正在使用 greenlock-express API 现在,在获取证书时我无法通过 http-01 质询。我可以卷曲文件: http ://myserver.com/.well-known/acme-challenge/hRsScb0ZHcFyaroe73h2lnFcQfCTeDwFhVB8PtKHfYs

但是在运行我的应用程序时出现错误: le-sni-auto 中的错误:错误:CA 无法验证您提供的文件。

获取http://myserver.com/.well-known/acme-challenge/hRsScb0ZHcFyaroe73h2lnFcQfCTeDwFhVB8PtKHfYs:超时

我无法确定正在发生的事情......有什么想法吗?

编辑 170912 - 配置详细信息

var lex = require('greenlock-express').create({
server: 'staging'
,challenges: {'http-01': require('le-challenge-fs').create({ webrootPath: './letsencrypt/tmp' })}
,store: require('le-store-certbot').create({
configDir: './letsencrypt'
    ,privkeyPath: ':configDir/live/:hostname/privkey.pem'
    ,fullchainPath: ':configDir/live/:hostname/fullchain.pem'
    ,certPath: ':configDir/live/:hostname/cert.pem'
    ,chainPath: ':configDir/live/:hostname/chain.pem'
    ,webrootPath: ':configDir/tmp'
    ,debug: false
    })
,approveDomains: approveDomains
});

function approveDomains(opts, certs, cb) {
if (certs) {
    opts.domains = certs.altnames;
}
else {
    opts.email = 'contact@myserver.com';
    opts.agreeTos = true;
    opts.domains = [ 'myserver.com'];
}

cb(null, { options: opts, certs: certs });
}

http.createServer(lex.middleware(require('redirect-https')())).listen(80, _ => {
console.log("Listening for ACME http-01 challenges on", this.address());
});

https.createServer(lex.httpsOptions, lex.middleware(app)).listen(443, function () {
console.log("Listening for ACME tls-sni-01 challenges and serve app on", this.address());
});
4

0 回答 0