【发布时间】:2019-01-26 13:17:10
【问题描述】:
我需要使用 greenlock-express 保护 *.keytap.xyz。我的 DNS 是 DigitalOcean,我使用的是 greenlock 插件,但无论我是否将其放入,我都会收到错误消息:
Fetching certificate for '*.keytap.xyz' to use as default for HTTPS server...
Unhandled rejection Error: invalid SNI
我为 greenlock-express 使用 2.6.7 版本,为 le-challenge-digitalocean 使用 2.1.0。
我的代码是:
var leChallengeDigitalOcean = require('le-challenge-digitalocean').create({
debug: false,
doApiKey: 'xxxxxxxxxxxxxx'
});
require('greenlock-express').create({
server: 'https://acme-staging-v02.api.letsencrypt.org/directory',
challengeType: 'dns-01',
challenges: {
'dns-01': leChallengeDigitalOcean
},
email: 'archie@serveradmin.xyz',
agreeTos: true,
confDir: '~/.config/acme',
approveDomains: ['*.keytap.xyz'],
app: app
}).listen(80, 443);
我什至不知道什么是 SNI。提前致谢。
【问题讨论】:
-
另外,我找不到任何带有通配符的文档,尽管 npm 页面说它受支持。
标签: node.js express ssl https greenlock