i'm having a problem here, this message is appearing when i test my SSL:
Certificate chain is incomplete.
I already create the http and the https server in my entry point file, and is running in some browsers without problem, but in others appear the message saying the site is not safe because the chain is incomplete.
How can i install properly the SSL to make the chain complete?
This is how i do:
SSL FOLDER
|- credentials.js
|- site.pem
|- site-cert.pem
|- site-ca.pem
In my credentials.js i have:
var fs = require('fs');
var credentials = {
key: fs.readFileSync(__dirname + '/mysite.pem', 'utf8'),
cert: fs.readFileSync(__dirname + '/mysite-cert.pem', 'utf8'),
ca: fs.readFileSync(__dirname + '/mysite-ca.pem', 'utf8'),
passphrase: 'secretphrase'
};
module.exports = credentials;
And in my entry point i have:
var app = require('../app');
var http = require('http');
var https = require('https');
var credentials = require('./ssl/credentials');
http.createServer(app).listen(3000, app.get('ip'), function() {
console.log('Running on port 3000, in ' + app.get('env') + ' mode.');
});
https.createServer(credentials, app).listen(443, app.get('ip'), function() {
console.log('Running on port 443, in ' + app.get('env') + ' mode.');
});
Maybe i forget something?
I'm not getting way the problem with the chain.