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:
- Install certbot:
sudo yum install certbot - Install the Nginx plugin for certbot:
sudo yum install certbot-nginx - Stop Nginx:
sudo systemctl stop nginx - Obtain a SSL certificate using certbot:
sudo certbot --nginx - certbot will run an SSL certificate check and automatically configure Nginx to use SSL.
- Start Nginx:
sudo systemctl start nginx - Test the SSL certificate by accessing your website over HTTPS.
