Linux serverNETWORK ADMINISTRATIONS

How to Install Let's Encrypt SSL on CentOS 7 | Free SSL | CentOS 7 | Let's Encrypt | Step by Step

How to Install Let’s Encrypt SSL on CentOS 7 | Free SSL | CentOS 7 | Let’s Encrypt | Step by Step
******************************************************************************
*** Try Vultr for free with $100 : https://www.vultr.com/?ref=8372740-6G ***
******************************************************************************
*** *** ***
-Prerequisites
+ Have a domain name pointing to your public server IP.
In this tutorial we will use hvthang.xyz

* Step 1 : Install Apache on systems

1.1.Installing Apache
#yum install httpd -y

1.2-Enable and start the Apache service:
#systemctl start httpd
#systemctl enable httpd

1.3-Open Port 80 (HTTP) and 443 (HTTPS) in Firewall
#firewall-cmd –permanent –zone=public –add-service=http
#firewall-cmd –permanent –zone=public –add-service=https
#firewall-cmd –reload

* Step 2 : Setup Apache Virtual Hosts
2.1.Create a folder for vhost
#mkdir /var/www/hvthang.xyz

2.2.Create a Pages for Virtual Host
cd /var/www/hvthang.xyz
touch index.html
vim index.html
html
title My Website /title
body My Website /body
/html

2.3.Grant Permisions
#chown -R apache:apache /var/www/hvthang.xyz

2.4.Create New Virtual Host Files
By default, Apache is configured to load all configuration files that ends with .conf from the /etc/httpd/conf.d/ directory.
touch hvthang.xyz.conf
vim hvthang.xyz.conf
VirtualHost *:80
ServerName hvthang.xyz
ServerAlias www.hvthang.xyz
ServerAdmin webmaster@hvthang.xyz
DocumentRoot /var/www/hvthang.xyz

Directory /var/www/hvthang.xyz
Options -Indexes +FollowSymLinks
AllowOverride All
/Directory

ErrorLog /var/log/httpd/hvthang.xyz-error.log
CustomLog /var/log/httpd/hvthang.xyz-access.log combined
/VirtualHost

* Step 3 : Install Certbot

Certbot is a tool that simplifies the process for obtaining SSL certificates from Let’s Encrypt and auto-enabling HTTPS on your server.
3.1.Install Certbot

The certbot package is provided by EPEL and mod_ssl is also required for the Encryption.First,we are need install EPEL and mod_ssl
#yum install epel-release
The EPEL repository is enabled – Installing Certbot
#yum install
3.2.Setting up the SSL certificate

certbot –apache -d hvthang.xyz www.hvthang.xyz

Step 4.Test
https://www.ssllabs.com/ssltest/

Song: Elektronomia & JJD – Free [NCS Release]
Music provided by NoCopyrightSounds.
Video: https://youtu.be/9Va88Kt0NN0
Link: http://ncs.io/Free

Song: Lensko – Let’s Go! [NCS Release]
Music provided by NoCopyrightSounds.
Video: https://youtu.be/mSLuJYtl89Y
Free Download / Stream: http://ncs.io/letsgo

Song: Elektronomia – Sky High [NCS Release]
Music provided by NoCopyrightSounds.
Video: https://youtu.be/TW9d8vYrVFQ
Free Download / Stream: http://ncs.io/skyhigh

source

centos 7

Leave a Reply

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