How to install Comodo’s SSL certificate?

Comodo PositiveSSL SSL certificate is a type of Domain Validation that many users use because it is cheap, easy to install, and does not require confirmation of any information.

In this article, I will show you how to install the PositiveSSL certificate on the server using Nginx. With Let’s Encrypt, check out this tutorial.

1. Generate certificate

After registering for SSL, you will need to generate the new certificate file.

In this step, you need to provide the Private Key (and CSR Key), be sure to save this private key for use in the step below. It’s up to you to register certificate that support different auto generate keys.

The format of the private key is:

The SSL certificate email from Comodo has the following title: “Your PositiveSSL Certificate for coupontree.co”, in the mail attach a compressed file coupontree_co.zip contains 2 files:

Coupontree_co.crt
Coupontree_co.ca-bundle

You use any editor, ex: Notepad ++, open the file coupontree_co.crt, copy all the content and paste to the top of the file coupontree_co.ca-bundle, save to file ssl-bundle.crt.

At this time, the ssl-bundle.crt certificate file will contain the contents of both .crt and .ca-bundle files. You note the order for the standard!

2. Install the SSL certificate

Create the folder containing the certificate file:

Save the certificate file content in this folder, copy/paste using nano:

Save Private Key content in Folder:

Create 2048 bit DH parameter files, the generate process will take a long time:

Next, we will edit the Nginx configuration file. For example, your domain name is “coupontree.co”, the configuration file will have a path of /etc/nginx/conf.d/coupontree.co.conf.

Open configuration file with nano

SSL configuration handles requests

In block server adjust the second {…}:

+ Change listen 80 default_server; To listen 443 ssl http2;

+ Following line server_name coupontree.co; Add the optimized SSL configuration snippet:

Redirect all www http to https

In the server {…} block at the top:

+ Change server_name www.coupontree.co; Go to server_name coupontree.co www.coupontree.co;

+ Change rewrite ^ (. *) Http: //coupontree.co$1 permanent; To rewrite ^ (. *) Https: //coupontree.co$1 permanent;

The results are as follows:

At this time, visit http://coupon=tree.co or https://www.coupontree.co will automatically redirect to https://coupontree.co

Redirect all www https to https

Add new server { … } block at the top

At this time, visit https://www.coupontree.co will automatically redirect to https://coupontree.co

Check Nginx configuration

Restart Nginx

If you use WordPress, install the Really Simple SSL plugin to auto redirect http to https and move all .css, .js link to https.

If you do not want to use the Really Simple SSL plugin, please refer to the Let’s Encrypt Installation Guide in cPanel for instructions on how to do it manually.

Now visit the domain to enjoy the results. Good luck.

Leave a Reply

Your email address will not be published. Required fields are marked *