How to install your SSL certificates on NGINX

In my previous post, I talk about how to create a CSR file [ 1] to ask for a domain, now let’s install the SSL Certificate in our HTTP(S) server, specifically in NGINX [ 2].

The NGINX server uses the ngingx.conf file to specify its configuration. This configuration file can be found in folder etc/nginx/nginx.conf. On this link [ 3] there is a full example configuration.

The SSL certificate (server.crt) and the private key (server.key) generated with the CSR file must be placed on the etc/nginx/ssl folder as can be seen on the following example:

server {
listen 443 ssl;
server_name ${ SERVER_NAME }
localhost 127.0.0.1;
# SSL
ssl_certificate /etc/nginx/ssl/server.crt;
ssl_certificate_key /etc/nginx/ssl/server.key;

Originally published at https://dsuarezf.github.io on November 14, 2020.

--

--