• Categories
    Category
  • Categories
    Category
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial Comments FAQ Related Articles

How To Install and Configure OpenSSL Certificate for Apache on REDHAT 8.5

  • 00:06 cat /etc/os-release
  • 00:26 yum install httpd*
  • 00:51 systemctl enable httpd
  • 01:03 systemctl start httpd
  • 01:20 firewall-cmd --permanent --add-service=http
  • 01:37 firewall-cmd --permanent --add-service=https
  • 01:55 firewall-cmd --reload
  • 02:16 yum install mod_ssl
  • 02:34 systemctl restart httpd
  • 02:51 openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/pki/tls/private/apache-selfsigned.key -out /etc/pki/tls/certs/apache-selfsigned.crt
  • 04:31 vim /etc/httpd/conf.d/test.conf
  • 04:53 mkdir /var/www/html/test
  • 05:04 cd /var/www/html/test
  • 05:18 vi index.html
  • 06:03 vim /etc/hosts
  • 06:34 apachectl configtest
  • 06:55 systemctl reload httpd
  • 07:16 firewall-cmd --reload
6983

To Install and Configure openssl Certificate for Apache on REDHAT 8.5

Introduction:

The SSL/TLS security protocol protects data confidentiality and integrity during transit. By encrypting data between the web browser and web server, it ensures confidentiality. Furthermore, the webserver and browser exchange keys to decrypt the data, ensuring its integrity.

Installation Procedure:

Step 1: Check the installed version of OS by using the below command

[root@linuxhelp ~]# cat /etc/os-release 
NAME="Red Hat Enterprise Linux"
VERSION_ID="8.5"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Red Hat Enterprise Linux 8.5 (Ootpa)"

Step 2: Install the Apache Web Server by using the below command

[root@linuxhelp ~]# yum install httpd
Updating Subscription Management repositories.
Unable to read consumer identity
================================================================================
 Package             Arch    Version                                   Repo
                                                                           Size
================================================================================
Installing:
apr-util-bdb        x86_64  1.6.1-6.el8                               1   25 k
 apr-util-openssl    x86_64  1.6.1-6.el8                               1   27 k

Transaction Summary
================================================================================
Install  17 Packages

Total download size: 5.9 M
Installed size: 19 M
Is this ok [y/N]: y
Downloading Packages:
(1/17): apr-1.6.3-12.el8.x86_64.rpm             6.4 MB/s | 130 kB     00:00    
(16/17): openldap-devel-2.4.46-18.el8.x86_64.rp  61 MB/s | 812 kB     00:00    
(17/17): redhat-logos-httpd-84.5-1.el8.noarch.r  10 MB/s |  29 kB     00:00    
--------------------------------------------------------------------------------
 
  redhat-logos-httpd-84.5-1.el8.noarch                                          

Complete!

Step 3: Enable the Services of Apache server by using the below command

 [root@linuxhelp ~]# systemctl enable httpd
Created symlink /etc/systemd/system/multi-user.target.wants/httpd.service → /usr/lib/systemd/system/httpd.service.

Step 4: Start the Services of Apache server by using the below command

 [root@linuxhelp ~]# systemctl start httpd

Step 5: Add the firewall for http by using the below command

[root@linuxhelp ~]# firewall-cmd --permanent --add-service=http
Success

Step 6: Add the firewall for https by using the below command

[root@linuxhelp ~]# firewall-cmd --permanent --add-service=https
Success

Step 7: Reload the Firewall by using the below command

[root@linuxhelp ~]# firewall-cmd --reload
success

Step 8: Install The mod_ssl ,an Apache module for SSL encryption by using the below command

 [root@linuxhelp ~]# yum install mod_ssl
Updating Subscription Management repositories.
Unable to read consumer identity

This system is not registered with an entitlement server. You can use subscription-manager to register.

Last metadata expiration check: 0:02:42 ago on Friday 13 May 2022 08:15:27 AM IST.
Dependencies resolved.
================================================================================
 Package    Arch      Version                                        Repo  Size


================================================================================
Installing:
 mod_ssl    x86_64    1:2.4.37-41.module+el8.5.0+11772+c8e0c271      1    136 k
Is this ok [y/N]: y
Downloading Packages:
mod_ssl-2.4.37-41.module+el8.5.0+11772+c8e0c271  21 MB/s | 136 kB     00:00    
--------------------------------------------------------------------------------
Complete!

Step 9: Restart the apache server by using the below command

 [root@linuxhelp ~]# systemctl restart httpd

Step 10: create the SSL key and certificate by using the below command

 [root@linuxhelp ~]# openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/pki/tls/private/apache-selfsigned.key -out /etc/pki/tls/certs/apache-selfsigned.crt
Generating a RSA private key
Country Name (2 letter code) [XX]:IN
State or Province Name (full name) []:TN
Locality Name (eg, city) [Default City]:CHENNAI 
Organization Name (eg, company) [Default Company Ltd]:EXAMPLE
Organizational Unit Name (eg, section) []:EXAMPLE 1
Common Name (eg, your name or your server's hostname) []:192.168.6.127
Email Address []:linuxserver@example.com

Step11: Create the Virtual Host configuration by using the below command

[root@linuxhelp ~]# vim /etc/httpd/conf.d/test.conf
<VirtualHost *:443>
    ServerName linuxhelp.com
    DocumentRoot /var/www/html/test
    SSLEngine on
    SSLCertificateFile /etc/pki/tls/certs/apache-selfsigned.crt
    SSLCertificateKeyFile /etc/pki/tls/private/apache-selfsigned.key
</VirtualHost>

Step 12: Make the directory by the name of test by using the below command

 [root@linuxhelp ~]# mkdir /var/www/html/test

Step 13: change the directory on following path by using the below command

[root@linuxhelp ~]# cd /var/www/html/test

Step 14: Create .html extension file by using the below command

 [root@linuxhelp test]# vi index.html
	<h1> welocome To Linuxhelp.com</h1>

Step 15: put the host entry by using the below command

 [root@linuxhelp test]# vim /etc/hosts
	192.168.6.127 linuxhelp.com                          

Step 16: Check the Apache configuration for syntax errors by using the below command

 [root@linuxhelp test]# apachectl configtest
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::20c:29ff:fe86:be5c. Set the 'ServerName' directive globally to suppress this message
Syntax OK

Step 17: Reload the Apache server by using the below command

[root@linuxhelp test]# systemctl reload httpd

Step 18: Reload the firewall by using the below command

 [root@linuxhelp test]# firewall-cmd --reloads
success

Step 19: Go to your favorite Browser and search your domain as shown in the below image snap 1

Step 20 click Advanced as shown in the below image Snap 2

Step 21: Click Accept the Risk and Continue as shown in the below image Snap 3

Output Snap 4

By this to Install and Configure openssl Certificate for Apache on REDHAT 8.5 is Completed.

Tags:
sebastian
Author: 

Comments ( 0 )

No comments available

Add a comment

Frequently asked questions ( 5 )

Q

1, What are SSL/TLS certificates?

A

Ans: SSL/TLS is a standard security protocol that ensures the confidentiality and integrity of data while in transit. It encrypts the data flow between the web browser and web server, hence ensuring confidentiality. Also, the webserver and browser exchanges key to decrypt the data, which ensures the integrity of the data.

Q

2. What is a Certificate Signing Request (CSR)?

A

Ans: Certificate Signing Request or CSR is encoded information that contains the applicant's information such as a common name, a name of an organization, email address, city, state, and country. This encoded information is used by certifying authority (CA) to issue an SSL certificate to the applicant.

Q

3. Discuss some public-key encryption algorithms used in SSL.

A

Ans: Public key encryption is used to exchange the symmetric key between browser and web server. Some of the algorithms used Elliptic curve cryptography (ECC), RSA, etc.

Q

4. What does S/MIME do in OpenSSL?

A

Ans: The OpenSSL S/MIME utility is useful for signing and encrypting S/MIME messages. S/MIME messages can be signed by multiple signers, encrypted, decrypted, and verified.

Q

5. What do you mean by X509 in OpenSSL?

A

Ans: The x509 command is a multi-purpose certificate utility. It can be used to display certificate information, convert certificates to various forms, sign certificate requests like a "mini CA" or edit certificate trust settings.

Related Tutorials in How To Install and Configure OpenSSL Certificate for Apache on REDHAT 8.5

Related Tutorials in How To Install and Configure OpenSSL Certificate for Apache on REDHAT 8.5

How to install and update OpenSSL on Ubuntu 16.04
How to install and update OpenSSL on Ubuntu 16.04
Mar 9, 2017
How to install Apache from Source Code on CentOS 7
How to install Apache from Source Code on CentOS 7
Oct 21, 2017
How to Completely Remove and Install Apache package on CentOS 7.6
How to Completely Remove and Install Apache package on CentOS 7.6
May 23, 2019
How to Install Pligg - Content Management System
How to Install Pligg - Content Management System
Jul 26, 2016
How to Install and Update OpenSSL on CentOS 6 / CentOS 7
How to Install and Update OpenSSL on CentOS 6 / CentOS 7
Mar 11, 2017
How to install apache jmeter on ubuntu 18.04
How to install apache jmeter on ubuntu 18.04
May 19, 2018
How to Configure HAproxy Load Balancer with Keepalived in CentOS
How to Configure HAproxy Load Balancer with Keepalived in CentOS
Nov 21, 2016
How to enable the Apache server-status on centos 7
How to enable the Apache server-status on centos 7
Jan 28, 2019

Related Forums in How To Install and Configure OpenSSL Certificate for Apache on REDHAT 8.5

Related Forums in How To Install and Configure OpenSSL Certificate for Apache on REDHAT 8.5

CentOS
connor class=
How To Completely Remove Apache package On CentOS 7.6
May 14, 2019
redhat
ethan class=
How to fix "container-selinux >= 2:2.74" issue while Installing Docker-CE on RHEL7.6
Aug 25, 2020
Apache
isaac class=
How to disable apache welcome page on Ubuntu
Dec 15, 2018
OpenSUSE
dalogui class=
Ayuda urgente instale SSL para servidor Opensuse y ahora no funciona tengo servicio web
Jul 15, 2019
Apache
rebeccajazz class=
Apache2 : mod_proxy in opensuse
Jan 3, 2018
Apache
elijah class=
What is the difference between httpd and apache
Feb 18, 2017
Apache
logan class=
How to install Apache GUI
Feb 24, 2017
Linux
AadrikaAnshu class=
How to add timestamps to history On Any Linux Machine
Jun 18, 2019

Related News in How To Install and Configure OpenSSL Certificate for Apache on REDHAT 8.5

Related News in How To Install and Configure OpenSSL Certificate for Apache on REDHAT 8.5

Attackers take advantage of Apache Struts vulnerabilities
Attackers take advantage of Apache Struts vulnerabilities
Mar 17, 2017
An Apache Web Server Bug That Grants Root Access on  Shared Web Hosts
An Apache Web Server Bug That Grants Root Access on Shared Web Hosts
Apr 10, 2019
Red Hat Enterprise Linux 6.9 Hits Beta
Red Hat Enterprise Linux 6.9 Hits Beta
Jan 6, 2017
Red Hat initiates new pilot program to ease into Digital Transformation
Red Hat initiates new pilot program to ease into Digital Transformation
Mar 30, 2017
Red Hat Preconized Red Hat Openstack Platform 11
Red Hat Preconized Red Hat Openstack Platform 11
May 10, 2017
IBM TO ACQUIRE RED HAT
IBM TO ACQUIRE RED HAT
Nov 15, 2018
Red Hat Enterprise Linux 7.7 beta rolled out
Red Hat Enterprise Linux 7.7 beta rolled out
Jun 7, 2019
Oracle Vulnerability Exploited in the Wild
Oracle Vulnerability Exploited in the Wild
Jun 25, 2019
Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Luke ?
workbench for debian

I am using workbench in CentOS whereas now I need to use Debian Operating system so could you please help to install and use in Debian?

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.