• Contact
  • Contact Us
  • Disclamer
  • Home 1
  • Home 2
  • Home 3
  • Privacy Policy
Saturday, May 10, 2025
How VPS - How to use/setup VPS
  • Login
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
How VPS - How to use/setup VPS
No Result
View All Result
Home Operating System CentOS

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

How VPS by How VPS
February 16, 2020
in CentOS
0
How to Install Let's Encrypt SSL on CentOS 7 Running Apache Web Server
0
SHARES
48
VIEWS
Share on FacebookShare on Twitter

Introduction

How to Install Let’s Encrypt SSL on CentOS 7 Running Apache Web Server? In this tutorial, you will learn the procedure for installing the TLS/SSL certificate on the Apache web server. When finished, all traffic between server and client will be encrypted. This is a standard practice of protecting e-commerce sites and other financial services online. Let’s Encrypt is the pioneer in implementing free SSL and will be used as the certificate provider in this case.

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

Install Let's Encrypt SSL on CentOS 7

  1. Step1. Installing dependent modules
  2. Step 2. Downloading the Let’s Encrypt client
  3. Step 3. Obtain and configure the SSL certificate
  4. Step 4. Configuring automatic certificate renewal
  5. Conclusion

Prerequisites

Before you begin this guide, you will need the following:

  • SSH root access to a CentOS 7 VPS
  • Apache web server with domain and vhost configured correctly
  • A non-root sudo user

Step1. Installing dependent modules

To install certbot you will have to install the EPEL repository as it is not available by default, mod_ssl is also required for encryption to be recognized by Apache:

sudo yum install -y epel-release mod_ssl

Step 2. Downloading the Let’s Encrypt client

Next, you will install the certbot client from the EPEL repository:

sudo yum install python-certbot-apache

Step 3. Obtain and configure the SSL certificate

Certbot will handle SSL certificate management quite easily. It will generate a new certificate for the provided domain as a parameter.

In this case, example.com will be used as the domain to which the certificate will be issued:

sudo certbot --apache -d example.com

If you want to generate SSL for multiple domains or sub-domains, use the following command:

sudo certbot --apache -d example.com -d www.example.com

Note: The first domain should be your base domain, in this example: example.com.

When you install the certificate, you will receive a step-by-step guide that will allow you to customize the certificate details. You will be able to choose between forcing HTTPS or leaving HTTP as the default protocol. Providing an email address will be required as well, for security reasons.

When the installation is complete, you will receive a similar message:

IMPORTANT NOTES:
- If you lose your account credentials, you can recover through
emails sent to [email protected].
- Congratulations! Your certificate and chain have been saved at
/etc/letsencrypt/live/example.com/fullchain.pem. Your cert
will expire on 2019-04-21. To obtain a new version of the
certificate in the future, simply run Let's Encrypt again.
- Your account credentials have been saved in your Let's Encrypt
configuration directory at / etc / letsencrypt. You should make a
secure backup of this folder now. This configuration directory will
also have certificates and private keys obtained by Let's
Encrypt so regular backups of this folder is ideal.
- If you like Let's Encrypt, please consider supporting our work by:

Step 4. Configuring automatic certificate renewal

Let’s encrypt certificates are valid for 90 days. It is recommended to renew it within 60 days, in order to avoid any problems. To achieve this, certbot will assist us with your renewal command. It will verify that the certificate is less than 30 days from expiration:

sudo certbot renew

If the installed certificate is recent, certbot will only verify its expiration date:

Processing  /etc/letsencrypt/renewal/example.com.conf
The following certs are not due for renewal yet:
    /etc/letsencrypt/live/example.com/fullchain.pem (skipped)
No renewals were attempted.

To automate this renewal process, you can set up a cronjob. First, open the crontab:

sudo crontab -e

This work can be safely scheduled to run every Monday at midnight:

0 0 * * 1 / usr / bin / certbot renew >> /var/log/sslrenew.log

The output of the script will be piped to the /var/log/sslrenew.log file.

Conclusion

You just secured your Apache web server by implementing a free SSL certificate. From now on all traffic between server and client is encrypted.

Tags: Apache Web Server
Previous Post

How to Install LimeSurvey on CentOS 7

Next Post

How to Update CentOS 7, Ubuntu 16.04, and Debian 8

Next Post
How to Update CentOS 7, Ubuntu 16.04, and Debian 8

How to Update CentOS 7, Ubuntu 16.04, and Debian 8

Leave a Reply Cancel reply

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

No Result
View All Result

Recent Post

Install Imagemagick on CentOS
CentOS

Install Imagemagick on CentOS

by How VPS
June 28, 2023
0

This is how I installed Imagemagick on a vanilla CentOS server Start off by installing the prerequisites yum install php-pear...

Read more
how to Check phpinfo

How to Check phpinfo of Hosting or VPS?

June 28, 2023
Failed to download metadata for repo 'appstream' on Centos 8

How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

February 25, 2022
How to Fix MySQL Error "Plugin 'InnoDB' registration as a STORAGE ENGINE failed"?

How to Fix MySQL Error “Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed”?

November 17, 2020
How to optimize Mysql or MariaDB

How to optimize Mysql or MariaDB

November 3, 2020

Recent News

  • Install Imagemagick on CentOS
  • How to Check phpinfo of Hosting or VPS?
  • How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

Category

  • Arch
  • Authentication
  • Backups
  • BSD
  • Centmin Mod
  • CentOS
  • Control Panels
  • CoreOS
  • CWP
  • Debian
  • Directadmin
  • Encryption
  • Fedora
  • Firewalls
  • Hocvps Script
  • Hosting providers
  • Kloxo-MR
  • Linux
  • Mitigations
  • Operating System
  • Plesk
  • Reviews
  • Securing VPS/Servers
  • Security Patches
  • SSL Certificates
  • Uncategorized
  • Upgrading
  • VPS/Servers management guides
  • Vulnerability Detection
  • Web servers software
  • Webhosting Control Panel
  • About
  • Advertise
  • Careers
  • Contact

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
Thabet