In this article we will guide you how to configure Let’s Encrypt SSL Certificate on your Centos 7 Web-Server.
In-order to Install Let’s Encrypt, we should configure the following dependencies as follows:-
- Epel-release.
- Mod_SSL.
- Python-certbot-apache.
Installing dependent modules
yum install epel-release mod_ssl
Downloading the Let’s Encrypt client
yum install python-certbot-apache
Configuring SSL Certificate
Certbox is used to manage the SSL Certificate, it also used to generate the new certificate for any domain.
In this case SSL certificate will be generated for example.com, but it will not for any sub-domain.
certbot --apache -d example.com
Therefore, if you want to generate multiple domains and subdomains run the following command.
certbot --apache -d example.com -d www.example.com
Configuring auto renewal of the certificate
In-order to renew the certificate automatically, then create a cron job for automatically renewal.
crontab -e
0 0 * * 1 /usr/bin/certbot renew >> /var/log/sslrenew.log
This cron job will be scheduled automatically every Monday Midnight.