To configure Nginx with Let’s Encrypt on CentOS 8
- Install certbot:
sudo yum install certbot-nginx
- Obtain a SSL certificate:
sudo certbot --nginx
- Follow the prompts to enter your email address and agree to the terms of service
- Choose the domain name you want to generate the certificate for.
- The certbot will configure Nginx to use the new SSL certificate
- Verify that the SSL certificate is working by visiting your website with https://
- To automatically renew the certificate, you can set up a cron job to run the following command:
sudo certbot renew --nginx
This command will check for expiring certificates and renew them automatically.
(mnspas)