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.
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.