How to install Godaddy SSL Certificate to Nginx or Node.JS under Ubuntu OS

I assume you have already generated a private key (e.g. and a CSR and submitted the CSR file to Godaddy.  Now you just want to download and install the SSL certificate.

  1. There are many web server to choose.  Just pick Apache.
  2. Down the 2 files to a local folder (e.g. /etc/nginx/ssl)
    • Your SSL Certificate with a random name (Ex. c87b9chf834hts.crt)
    • The GoDaddy intermediate certificate bundle (gd_bundle-g2-g1.crt)
  3. Create a single chained certificate file by concatenating both 2 files:
       1: cat c87b9chf834hts.crt gd_bundle-g2-g1.crt >


Open your Nginx configuration file: (e.g. sudo subl /etc/nginx/sites-available/default)

   1: server {

   2:     ...

   3:     listen 443;

   4:     server_name;


   6:     ssl on;

   7:     ssl_certificate /etc/nginx/ssl/;

   8:     ssl_certificate_key /etc/nginx/ssl/;

   9:     ...

  10: }

Verify and test the modified configuration file:

   1: $ sudo nginx –t

Restart Nginx:

   1: $ sudo systemctl restart nginx

You can test the connection with a browser or openssl for more verbose testing:

   1: $ openssl s_client -connect localhost:443



   1: var express = require('express'),

   2:   app = express(),

   3:   port = process.env.PORT || 8080;


   5: var fs = require('fs');


   7: var options = {

   8:     key: fs.readFileSync('/etc/ssl/'),

   9:     cert: fs.readFileSync('/etc/ssl/')

  10: };


  12: var https = require('https');


  14: ...


  16: var serv = https.createServer(options, app);

  17: serv.listen(port);


  • Make sure your cloud provider (AWS or Azure) allows inbound traffic through 443.  Otherwise, you get a connection timeout.
  • By default, ufw is disabled.  Leave it disabled until you need it.  You can check the status by doing “sudo ufw status verbose”  It should say “inactive”



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s