How to configure Nginx with Let’s Encrypt on CentOS 7

To configure Nginx with Let’s Encrypt SSL certificate on CentOS 7, follow these steps:

  1. Install certbot:
    sudo yum install certbot
  2. Install the Nginx plugin for certbot:
    sudo yum install certbot-nginx
  3. Stop Nginx:
    sudo systemctl stop nginx
  4. Obtain a SSL certificate using certbot:
    sudo certbot --nginx
  5. certbot will run an SSL certificate check and automatically configure Nginx to use SSL.
  6. Start Nginx:
    sudo systemctl start nginx
  7. Test the SSL certificate by accessing your website over HTTPS.

Note: This method uses certbot, which is a tool to automatically obtain and configure SSL certificates. It supports Let’s Encrypt, which is a free, open and automated certificate authority.

Leave a Comment