Showing results for 
Show  only  | Search instead for 
Did you mean: 

Issue of installing SSL in multiple severs



Currently we have a wildcard SSL certificate. On a tomcat server, the SSL has been installed successfully. However, we try to install SSL certificate in another server.


#1 Correct me if I were wrong, we should be able to install the same certificate into a few sevrvers since it is a wildcard certificate. 


#2 Then we downloaded CSR and CRT from Godaddy. And use the private key generated from the first tomcat server. And host a node.js server. Use those credentials to host a https server. Then it failed. Console threw 

if (process.features.tls_npn && !opts.NPNProtocols) {
TypeError: Cannot read property 'NPNProtocols' of undefined


JS code is like below:


const express = require('express');
const app = express();
var fs = require('fs');
var http = require('https');

var privateKey = fs.readFileSync('/home/ec2-user/keys/private.key').toString();
var certificate = fs.readFileSync('/home/ec2-user/keys/godaddy.crt').toString();

//Splitted bundle crt into a few pieces. 
var credentials = {key: privateKey, cert: certificate, ca: [fs.readFileSync('/home/ec2-user/keys/1.crt'), fs.readFileSync('/home/ec2-user/keys/2.crt'),fs.readFileSync('/home/ec2-user/keys/3.crt')]};

var handler = function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World\n');

var server = http.createServer();
server.addListener("request", handler);
server.listen(443, function () {
console.log('Example app listening on port 443!')


From the research I made, people say it might be the key doesn't pair. Can some one guide me on this issue. How can I setup an separate HTTPS server by using wildcard SSL certificate in Node.js environment?