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)
- Copy the .crt file and encrypted .key file to nginx server
- Decrypt the .key file
openssl rsa -in encrypted.key -out decrypted.key
- Concatenate the .crt and and encrypted .key file
cat domain.crt encrypted.key > domain.pem
- Update nginx config file and add the following lines
ssl_certificate /etc/ssl_certs/domain.pem;
ssl_certificate_key /etc/ssl_certs/decrypted.key;
- Check nginx config
nginx -t
- Reload nginx
systemctl reload nginx
Top comments (0)