Hi, i'm trying to follow the tutorial/walkthrough, but I keep getting the following error. I'm not sure what I'm doing wrong.
Below is a screenshot and the code I use
require("greenlock-express")
.init({
packageRoot: __dirname,
configDir: "./greenlock.d",
maintainerEmail: "jon@example.com",
cluster: false
})
.ready(httpsWorker);
function httpsWorker(glx) {
//
// HTTPS 1.1 is the default
// (HTTP2 would be the default but... https://github.com/expressjs/express/issues/3388)
//
// Get the raw https server:
var httpsServer = glx.httpsServer(null, function(req, res) {
res.end("Hello, Encrypted World!");
});
httpsServer.listen(443, "0.0.0.0", function() {
console.info("Listening on ", httpsServer.address());
});
// Note:
// You must ALSO listen on port 80 for ACME HTTP-01 Challenges
// (the ACME and http->https middleware are loaded by glx.httpServer)
var httpServer = glx.httpServer();
`
You can not use IP address. SSL is for domain certificate.
You need to use a domain name and point the domain (or subdomain) to this IP address. Then add it using greenlock.sites.add(...)
Hi, i'm trying to follow the tutorial/walkthrough, but I keep getting the following error. I'm not sure what I'm doing wrong. Below is a screenshot and the code I use