HTTPS SSL Certificates for CentOS 6 and CentOS 7

Home » Computer Articles » Linux » HTTPS SSL Certificates for CentOS 6 and CentOS 7
May 2, 2018 Linux No Comments

Let’s Encrypt is a free, automated, and openCertificate Authority that you can use to secure your web server. I used Certbot to do the installation.

URL: https://letsencrypt.org/ and https://certbot.eff.org/

 

This is the setup for a Nginx CentOS 6 Server

Change into root directory

# cd /root/

Create a bin directory

# mkdir bin

Change into bin directory

# cd bin

Use wget to download script

# wget https://dl.eff.org/certbot-auto

Change the mode of the downloaded file

 # chmod a+x certbot-auto

Run the script in install SSL certificate for Nginx Web Server

# certbot-auto --nginx (Make sure servername is nginx is set properly)

Setup a cron job to check for renewal, default from doc was 0,12 midnight and noon.

# crontab -e 
0 0,12 * * * python -c 'import random; import time; time.sleep(random.random() * 3600)' && /root/bin/certbot-auto renew

Reference: https://certbot.eff.org/lets-encrypt/centos6-nginx

 

 

This is the setup for a Nginx CentOS 7 Server

Enable repo for certbot

# yum-config-manager --enable rhui-REGION-rhel-server-extras rhui-REGION-rhel-server-optional

Install certbot-nginx

# yum install certbot-nginx -y

Run to install SSL certificate for Nginx Web Server

# certbot --nginx (Make sure servername is nginx is set properly)

Setup a cron job to check for renewal, default from doc was 0,12 midnight and noon.

 # crontab -e 
0 0,12 * * * python -c 'import random; import time; time.sleep(random.random() * 3600)' && certbot renew

Reference: https://certbot.eff.org/lets-encrypt/centosrhel7-nginx

Share This:

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.