DEV Community

Cover image for Installing purchased SSL certificate on nginx (Ubuntu)
nanusdad
nanusdad

Posted on

Installing purchased SSL certificate on nginx (Ubuntu)

There are several posts detailing how to install Lets Encrypt certificates on nginx. Recently, we were provided with a purchased certificate from one of the Certificate Authorities.

Below are the steps to update the nginx config file to utilize the purchased SSL certificate. (on Ubuntu)

Setting up SSL cert with nginx

  1. Copy the .crt file and encrypted .key file to nginx server
  2. Decrypt the .key file
openssl rsa -in encrypted.key -out decrypted.key
  1. Concatenate the .crt and and encrypted .key file
cat domain.crt encrypted.key > domain.pem
  1. Update nginx config file and add the following lines
 ssl_certificate /etc/ssl_certs/domain.pem;
 ssl_certificate_key /etc/ssl_certs/decrypted.key;
  1. Check nginx config
nginx -t
  1. Reload nginx
systemctl reload nginx

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs