Categories: SQL Complex Queries

How to Install Comodo PositiveSSL Certificate on Nginx with Ease

SSL certificates serve as digital passports for websites. They’re digital certificates built to establish secure connections between web servers and users’ browsers to establish trust.

Notably, 85% of internet users actively avoid unsecured websites. In fact, many seek HTTPS and the padlock symbol in the URL before proceeding with a connection.

To ensure the confidentiality and integrity of data transmitted on your website, installing an SSL certificate on your server is imperative. Incidentally, search engines like Google consider HTTPS encryption as a ranking signal. This alone makes the installation of an SSL Certificate essential for improving your website’s online visibility and, ultimately, user engagement.

How do you Install Comodo Positive SSL Certificate on Nginx?

Getting an SSL certificate in 2023 is a breeze compared to the past. Today, SSL certificates are quite affordable, with entry-level options available for as low as $8 to $12 per year.

This widely depends on your vendor, though. Perhaps, the only twist is in the setup process.

If you are not good at server configurations, you may find the set up process a little daunting. You do not have to worry though if you’re using Nginx. Follow these steps to install Comodo Positive SSL certificate on Nginx.

  • Step 1: Check to ensure that Nginx is fully and correctly installed on your system.
  • Step 2: Run this command to generate your private key and CSR (Certificate Signing Request):

openssl req -new -newkey rsa:2048 -nodes -keyout domainname_com.key -out domainname_com.csr

You will get two files:

  1. DOMAINNAME_COM.KEY: Your Private Key (needed for Nginx configuration).
  2. DOMAINNAME_COM.CSR: Your CSR file.
  • Step 3: Purchase an SSL certificate. Once you complete the order process, you’ll have to complete the configuration process and domain approval process. After that, the CA will send a zip file attached to your registered email. A zip file containing the following files:
  1. Root CA Certificate: AddTrustExternalCARoot.crt
  2. Intermediate CA Certificate: COMODORSAAddTrustCA.crt
  3. Intermediate CA Certificate: COMODORSADomainValidationSecureServerCA.crt
  4. Your PositiveSSL Certificate: www_domainname_com.crt (or the subdomain you provided)
  • Step 4: Combine all the certificate files into a single file. Nginx requires the certificate and CA chain to be combined. Use the following command if you have individual certificate files:

cat www_domainname_com.crt ComodoHigh-AssuranceSecureServerCA.crt AddTrustExternalCARoot.crt > ssl-bundle.crt

  • If you have a .crt and .ca-bundle file, use the following command:

cat www_domainname_com.crt www_domainname_com.ca-bundle > ssl-bundle.crt

You can as well use a GUI-based text editor to combine the files.

  • Step 5: Configure your Nginx Virtual Host. Follow these steps:
  1. Transfer the newly created SSL-bundle.crt file to the directory where you save certificate files (e.g., /etc/ssl/certs/ for Ubuntu or /usr/local/ssl/certs for Windows).
  2. Edit the configuration file of your website. Find it in /etc/nginx/sites-available/. Alternatively, check; /usr/local/nginx/sites-available/.
  3. These options must be set correctly in the configuration file:

server {

listen 443;

server_name domainname.com;

ssl on;

ssl_certificate /etc/ssl/certs/ssl-bundle.crt;

ssl_certificate_key /etc/ssl/private/domainname.key;

ssl_prefer_server_ciphers on;

}

  1. Replace domainname.com with your actual domain name. Replace the domain name.key with your private key file path.
  • Step 6: Restart Nginx to apply the changes.

How do I Ensure SSL Certificate is Installed Correctly?

Browsers like Google Chrome will trigger SSL error warnings like mismatched domain names, incomplete certificate chains or expired certificates if your SSL certificate isn’t installed correctly. These errors may discourage visitors. 

They may also interfere with your rankings on results pages. Here are simple ways to check if your SSL certificate has been installed correctly;

  • Check the browser’s address bar: Type your website URL in a browser. The URL should begin with https://. Not http://. A padlock icon should also be displayed. This verifies the secure connection.
  • Verify certificate details: You can check your certificate details by clicking on the padlock icon. The certificate should also be valid, and not expired.
  • Use SSL/TLS checker tools: There are online SSL/TLS checker tools that you can use to scan your website. The scan result will reveal detailed information about your SSL certificate’s validity. It will also show the expiration date, and any potential errors. Popular tools include SSL Labs’ SSL Server Test and the Qualys SSL Server Test.
  • Online SSL validation services: Certificate authorities and other organizations offer online SSL validation services that allow you to input your website’s URL and receive a validation report. These services can help identify any configuration or installation issues.
  • Check browser warnings: Try accessing your website URL on different browsers and devices. Ensure no warning messages or errors are displayed when accessing it. Common browser warnings include “Your connection is not private” or “Invalid certificate.”

Closing Thoughts :

Installing an SSL certificate on Nginx may seem frustrating. However, it is all worth it in the end. So, if you’ve not yet made the switch from HTTP to HTTPS, act today. A valid SSL certificate will not only safeguard your website but also the privacy of customers who trust you with their confidential information.

Amit S

Oracle Consultant with vast experience in Oracle BI and PL/SQL Development. Amiet is the admin head of this website who contributes by preparing tutorials and articles related to database technologies. He is responsible to manage the content and front-end of the website.

Share
Published by
Amit S

Recent Posts

What is Root Cause Analysis (RCA) With real examples

In my previous article I have given details about application support engineer day to day…

1 month ago

Application Support Engineer Day to day responsibilities

In my previous articles I have given the roles and responsibilities of L1,L2 and L3…

1 month ago

What is mean by SLA ( Service Level Agreement) with Examples?

In my previous articles i have given the hierarchy of production support in real company…

1 month ago

What is Production support Hierarchy in organization?

In this article i would like to provide information about production support organization structure or…

1 month ago

What are roles and responsibilities for L3 Support Engineer?

In my previous article I have given roles for L1 and L2 support engineer with…

1 month ago

What are roles and responsibilities of L2 Engineer?

I have started this new series of how to become application support engineer. This article…

1 month ago