To install an SSL certificate on CentOS, you can use the certbot tool to obtain and install Let’s Encrypt SSL certificates.
Here are the step-by-step instructions.

Install Certbot

sudo yum install epel-release 
sudo yum install certbot python2-certbot-apache

Obtain and Install SSL Certificate

Run Certbot to obtain and install the SSL certificate for your domain:

sudo certbot --apache -d -d

Replace with your actual domain name.
Certbot will guide you through the process of obtaining and installing the SSL certificate. It will also configure your Apache server to use the certificate.

Verify the Certificate Installation

After the installation is complete, Certbot will print a message confirming the successful installation and provide instructions on how to verify the installation. It usually involves checking your domain in a web browser to see if it is using HTTPS.

Automatically Renew SSL Certificate

Certbot can automatically renew your SSL certificate before it expires. To enable automatic renewal, you can set up a cron job:

sudo crontab -e

Then add the following line to the crontab file:

0 0 * * * /usr/bin/certbot renew --quiet

This cron job will run every day at midnight to check if your certificate is due for renewal and renew it if necessary.

That’s it! Your SSL certificate is now installed and configured on your CentOS server. Make sure to update your website links to https://, and you’re all set.

Maybe you can’t login wordpress wp-admin due to https redirect.
You can refer to the following article to modify the database to fix the issue. .

Categories: Web

0 0 votes
Article Rating
Notify of

1 Comment
Newest Most Voted
Inline Feedbacks
View all comments

[…] (2) The second way: Install Let’s Encrypt SSL certificates. The related post: […]

XOR Strings
: Input your strings, the tool can encrypt and decrypt them.

Would love your thoughts, please comment.x