Claim your Biolink Click Here
3 like 0 dislike
547 views
I would like to install free SSL on my centos 7 server
in Education & Reference by (460 points) | 547 views
1 0
prerequisites:
yum install mod_ssl

1 Answer

1 like 0 dislike
Best answer
INSTALL SSL LetsEncrypt

First STEP 

vi /etc/httpd/conf/httpd.conf

<VirtualHost *:80>
     RewriteEngine On
     RewriteCond %{HTTPS} off
     #RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
     ServerAdmin root@localhost
     DocumentRoot /var/www/html/
     ServerName Domain.com
     ServerAlias Domain.com
     ErrorLog /var/www/html/error.log
</VirtualHost>

THEN

1) SSH into the server
SSH into the server running your HTTP website as a user with sudo privileges.


2) Install snapd
Installing snap on CentOS

cat /etc/centos-release

Adding EPEL to CentOS 7

sudo yum install epel-release

sudo yum install snapd
sudo systemctl enable --now snapd.socket
sudo ln -s /var/lib/snapd/snap /snap


3) Ensure that your version of snapd is up to date
sudo snap install core
sudo snap refresh core

4) Remove certbot-auto and any Certbot OS packages
sudo yum remove certbot

5) Install Certbot
sudo snap install --classic certbot

6) Prepare the Certbot command
sudo ln -s /snap/bin/certbot /usr/bin/certbot

7) Choose how you'd like to run Certbot Either get and install your certificates.
sudo certbot --apache

and follow the instruction as per on the screen


8) Test automatic renewal
sudo certbot renew --dry-run


/etc/crontab/
/etc/cron.*/*
systemctl list-timers

9) Confirm that Certbot worked
To confirm that your site is set up properly, visit https://yourwebsite.com/ in your browser and look for the lock icon in the URL bar.
by (4.7k points)
1 0
prerequisites:
yum install mod_ssl
0 0
Add the below line in httpd.conf

RewriteCond %{SERVER_NAME} =Domain.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]


Include /etc/httpd/conf/httpd-le-ssl.conf

Related questions

0 like 0 dislike
1 answer
1 like 0 dislike
1 answer
2 like 0 dislike
2 answers
asked May 30, 2020 in Education & Reference by john (80 points) | 563 views
1 like 0 dislike
1 answer
1 like 0 dislike
1 answer
2 like 0 dislike
0 answers
asked May 31, 2020 in Education & Reference by Marc (4.7k points) | 294 views
0 like 0 dislike
1 answer
1 like 0 dislike
1 answer
asked Jan 4, 2018 in Education & Reference by Simmi (820 points) | 492 views
2 like 1 dislike
2 answers
asked Nov 29, 2017 in Education & Reference by Sam (1.6k points) | 4.2k views
0 like 0 dislike
1 answer
asked Oct 23, 2018 in Education & Reference by Krish (1.1k points) | 375 views

Where your donation goes
Technology: We will utilize your donation for development, server maintenance and bandwidth management, etc for our site.

Employee and Projects: We have only 15 employees. They are involved in a wide sort of project works. Your valuable donation will definitely boost their work efficiency.

How can I earn points?
Awarded a Best Answer 10 points
Answer questions 10 points
Asking Question -20 points

1,310 questions
1,471 answers
569 comments
4,809 users