Mobile app version of vmapp.org
Login or Join
Courtney195

: Does the server type matter when purchasing an SSL certificate from Network Solutions for NodeJS? I am running an instance of ExpressJS using NodeJS and wish to have it start using HTTPS. My

@Courtney195

Posted in: #Https #NodeJs #Openssl #SecurityCertificate #Server

I am running an instance of ExpressJS using NodeJS and wish to have it start using HTTPS.

My company purchases SSL certificates through Network Solutions. When trying to give them my CSR, Network Solutions asks for the type of web server I am using. (i.e. IIS, Apache w/ModSSL, Plesk, etc.) It doesn't offer any option for NodeJS or other.

I have contacted their support with my question but while I wait I would like to know from the community.


Which server type should I use? and
Does it even matter?


If relevant, I generated the CSR with OpenSSL on Ubuntu.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Courtney195

1 Comments

Sorted by latest first Latest Oldest Best

 

@Angela700

Node.js can handle certificates in multiple formats, but the most common and easiest to set up is the PEM format used by Apache, nginx, etc. It doesn't matter much what you request from NetSol, as long as it is not IIS, which uses a completely different format.

The only real hangup you may run into is with the intermediate CA certificates, which NetSol has a bunch of for some reason. These need to be concatenated together before use.

I would recommend you choose NetSol's Apache/Plesk option. With this option you'll receive several files, only two of which are important here:


example.com.crt - This is your actual certificate.
Apache_Plesk_Install.txt - Despite its confusing name, this file actually contains all of the intermediate CA certificates concatenated together, and you can use it as-is.


Of course, you will also need the private key you generated on your Ubuntu machine.

Even if you selected a different format for your keys, you should be able to log in to your account with Network Solutions and download your certificate and Apache_Plesk_Install.txt file separately.



Finally, you install these certificates somewhere on your server, and set up Node.js appropriately:

var https = require('https');
var fs = require('fs');

var options = {
key: fs.readFileSync('.../keys/private.key'),
cert: fs.readFileSync('.../keys/example.com.crt'),
ca: fs.readFileSync('.../keys/Apache_Plesk_Install.txt')
};

https.createServer(options, function (req, res) {
res.writeHead(200);
res.end("hello worldn");
}).listen(443);


And you're done!

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme