80 likes | 91 Views
Let's Encrypt is a free and popular SSL certificate generation tool. Here is how to install let's encrypt on NGINX web server. #nginx #ssl #security #letsencrypt <br><br>Visit https://ubiq.co/tech-blog/how-to-install-lets-encrypt-on-nginx/
E N D
Add Repository First we need to add pre-requisite repository for Let’s Encrypt client. Open terminal and run the following commands. $ sudo yum install epel-release $ sudo yum update
Install Let’s Encrypt client Run the following command to install Let’s Encrypt client. $ sudo yum install certbot python2-certbot-nginx
Enable HTTPS in firewall By default, HTTP port 80 and HTTPS port 443 are blocked in CentOS. Run the following command to open it to allow HTTP and HTTPS traffic. $ sudo firewall-cmd --permanent --add-service=http --add-service=https Reload firewall to apply changes $ sudo firewall-cmd --reload
Obtain Let’s Encrypt Certificate Run the following command to obtain Let’s Encrypt certificate for NGINX. Replace www.example.com with your domain name. $ sudo certbot --nginx -d www.example.com If you want to use same certificate for multiple domains or different variations of domains add them in the above command using -d option. Here’s an example to obtain Let’s Encrypt certificate for www.example.com as well as example.com $ sudo certbot --nginx -d www.example.com -d example.com
Verify Installation Reload your website using https:// protocol and use third party tools like SSL Labs Server Test to verify SSL certificate.
Verify Auto Renewal Let’s Encrypt certificates have a short duration of 90 days, after which you need to renew certificates. The certbot package that we installed automatically installs a cron job that runs twice a day and automatically renews any certificate within 30 days of expiry. You can test the renewal process with the following command $ sudo certbot renew --dry-run If you see no errors, you are all set. Hopefully, this article will help you install Let’s Encrypt SSL certificate in CentOS.
Thank You Visit for details https://ubiq.co/tech-blog/how-to-install-lets-encrypt-on-nginx/