DylanPiercey/auto-sni

certificate issue

mwaschkowski opened this issue · 2 comments

Hi,

I'm running auto-sni on my node.js server in ubuntu on a digital ocean vps with the code below. It works fine for http, but when going to https I get a certificate error shown here:

Certificate Error
There are issues with the site's certificate chain (net::ERR_CERT_AUTHORITY_INVALID).

image

I'm not sure what's wrong...

Thank you,

Mark

`var createServer = require("auto-sni");
var express = require("express");
var app = express();

app.get("/test", function (req, res) {
res.end('Hello, World!123');
});

createServer({
email: "mark@appweaverz.com",
server: 'https://acme-v01.api.letsencrypt.org/directory',
agreeTos: true,
debug: true, // Add console messages and uses staging LetsEncrypt server. (Disable in production)
domains: ["traqify.com"], // List of accepted domain names. (You can use nested arrays to register bundles with LE).
forceSSL: false, // Make this false to disable auto http->https redirects (default true).
redirectCode: 301, // If forceSSL is true, decide if redirect should be 301 (permanent) or 302 (temporary). Defaults to 302
ports: {
http: 80, // Optionally override the default http port.
https: 443 // Optionally override the default https port.
} }, app);
`

This is because of the debug option (uses let's encrypt dev servers for testing). Set debug to false and this should be resolved.