How to Install SSL Certificate in NGINX Server?

3 votes, average: 4.67 out of 53 votes, average: 4.67 out of 53 votes, average: 4.67 out of 53 votes, average: 4.67 out of 53 votes, average: 4.67 out of 5 (3 votes, average: 4.67 out of 5, rated)
Loading...
how to install ssl certificate in nginx server

Step by Step Instructions to Install Your Issued SSL Certificate in NGINX Server

After getting your desired SSL certificate issued, you’ll need to go one step further and install the issued SSL certificate into your NGINX webserver and prevent the “Not Secure” warning. In addition, if you’re using the NGINX server, then simply go through the below steps and get your issued SSL certificate installed.

Steps for Installing SSL Certificate in NGINX Server

Here are some quick steps for installing an Essential SSL certificate into your NGINX webserver and displaying secure HTTPS URLs to prevent users from facing warning messages like “Not Secure”:

Copy SSL Certificate Files

Firstly, you’ll need to copy all the certificate files and save them in an appropriate directory within the NGINX server. And, for better security, keep it in readable format through the root.

You’ll require to concatenate two certificates into a single file using the below-mentioned command:

cat your_domain_exmaple_name.crt Intermediate.crt >> bundle.crt

Edit virtual host file of NGINX server. And, for editing, all you have to do is copy the existing server module into the secure one and paste it into the original:

server {

listen   443;

ssl    on;

ssl_certificate    /etc/ssl/your_domain_name.pem; (or bundle.crt)

ssl_certificate_key    /etc/ssl/your_domain_name.key;

server_name your.domain.com;

access_log /var/log/nginx/nginx.vhost.access.log;

error_log /var/log/nginx/nginx.vhost.error.log;

location / {

root   /home/www/public_html/your.domain.com/public/;

index  index.html;

} }

And once you submit the code mentioned above, you’ll require to restart the server using the NGINX server:

sudo /etc/init.d/nginx restart

Congratulations! Once you complete the steps mentioned above, your SSL is installed in your NGINX webserver. Likewise, we recommend verifying it once using our SSL Checker Tool to ensure the installed Wildcard SSL certificate is working correctly.

Some of the Things to Take Care About Before Proceeding With Installation

Ensure you have the below-mentioned certificate files:

Server Certificate

The server certificate is for your website that comes in an email sent by the certificate authority. Nonetheless, if you haven’t received an email, you’ve one more option to get your server certificate. All you require to do is download it through an SSL order from Account Dashboard.

Intermediate Certificate

An intermediate certificate connects the device with the server to identify who has issued an installed SSL certificate. If you have received the ZIP folder of the CA certificates, you’ll find it within that folder. Also, you can even download the CA Bundle for your SSL certificate if you haven’t received any email.

Private Key

The private key is kept on your webserver. Likewise, if you’ve generated the CSR, you’ll have a private key with you. It’s recommended to keep the private key with yourself securely. Lastly, at the time of installation, you’ll also require this file.

comodo logo

COMODO Positive SSL – Starts at $4.99/Yr.

Buy or renew Positive SSL certificates and save up to 90% at CheapSSLweb.com. It includes 256-bit encryption, FREE site seal, unlimited re-issuance, unlimited server license, and more.

Janki Mehta

Janki Mehta

Janki Mehta is a Cyber-Security Enthusiast who constantly updates herself with new advancements in the Web/Cyber Security niche. Along with theoretical knowledge, she also implements her practical expertise in day-to-day tasks and helps others to protect themselves from threats.

Buy Cheap Wildcard SSL