我在“greenlock.d/live/URL_PATH/”中有 CA 证书文件。它的到期日期是 2022 年 8 月。
但是我现在想更新它们以检查它们是否在更新。请建议我如何随时更新它们?
我做了什么:
我尝试了多种解决方案,例如:
- 尝试了一些命令
- 在“greenlock.d/config.json”中更改更新时间(“renewAt”)
代码:
应用程序.js
'use strict';
var app = function(req, res) {
res.end('Hello, Encrypted World!');
};
module.exports = app;
服务器.js
'use strict';
var beapp = require('./app.js');
require('greenlock-express')
.init({
packageRoot: __dirname,
maintainerEmail: "EMAIL_ID",
configDir: './greenlock.d',
cluster: true
})
// .serve(beapp);
.ready(httpsWorker);
function httpsWorker(glx) {
var httpsServer = glx.httpsServer(null, beapp);
httpsServer.listen(443, "0.0.0.0", function () {
console.info("Listening on ", httpsServer.address());
});
}
greenlock.d/config.json
{
"defaults": {
"store": {
"basePath": "./greenlock.d",
"module": "greenlock-store-fs"
},
"challenges": {
"http-01": {
"module": "acme-http-01-standalone"
}
},
"renewOffset": "-45d",
"renewStagger": "3d",
"accountKeyType": "EC-P256",
"serverKeyType": "RSA-2048",
"subscriberEmail": "EMAIL_ID"
},
"sites": [
{
"subject": "URL_PATH",
"altnames": [
"URL_PATH"
],
"renewAt": 1
}
]
}