Secure Nginx server with LetsEncrypt

Last updated on June 16, 2020

Share

You need A Fully Qualified Domain Name (FQDN) pointing to a dedicated IP address of the webserver.
This needs to be configured by your DNS administrator or provider.

1 – Install Certbot in Centos 8

sudo curl -O https://dl.eff.org/certbot-auto
chmod 0755 /usr/local/bin/certbot-auto

2 – Configure Nginx server_name on nginx.conf

Edit nginx.conf an change the variable server_name to the same FQDN
of your server for example: server_name www.mysphere.com.br;

3 – Run the certbot command:

Execute sudo /usr/local/bin/certbot-auto –nginx and follow the instructions

Test if your Nginx server using https://<server_name>