December 22, 2024

How to Install Let’s Encrypt SSL Certificate on CentOS 7 Running Apache Web Server

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.

Vedant Kumar

Currently I'm working as an Implementation Engineer, Started my career as an System Administrator - Linux. Additionally loves to explore new technologies and research about new open-source software that ease the development cycle.

View all posts by Vedant Kumar →

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.

close

Ad Blocker Detected!

VEDANT EXPLAINS
We've noticed that you are using an ad blocker. Advertising helps fund our server cost and keep it truly independent. It helps to build our content creator team. So please disable your ad blocker, and help us to keep providing you with free- great content - for free. Thank you for your support.

Refresh