Install SSL module for Apache
1) Verify Apache Installation
[root@testbox ~]# httpd -v
Server version: Apache/2.4.62 (Red Hat Enterprise Linux)
Server built: Jul 15 2025 00:00:00
[root@testbox ~]#
2) Install mod_ssl Package
On RHEL systems, the SSL module is provided through the mod_ssl package.
[root@testbox ~]# dnf install mod_ssl
Last metadata expiration check: 1:40:55 ago on Wed 18 Mar 2026 10:38:37 AM UTC.
Dependencies resolved.
Package Architecture Version Repository Size
Installing:
mod_ssl x86_64 1:2.4.62-7.el9_7.2 rhel-9-for-x86_64-appstream-rpms-9 109 k
Upgrading:
httpd x86_64 2.4.62-7.el9_7.2 rhel-9-for-x86_64-appstream-rpms-9 46 k
httpd-core x86_64 2.4.62-7.el9_7.2 rhel-9-for-x86_64-appstream-rpms-9 1.5 M
httpd-filesystem noarch 2.4.62-7.el9_7.2 rhel-9-for-x86_64-appstream-rpms-9 12 k
httpd-tools x86_64 2.4.62-7.el9_7.2 rhel-9-for-x86_64-appstream-rpms-9 81 k
mod_lua x86_64 2.4.62-7.el9_7.2 rhel-9-for-x86_64-appstream-rpms-9 58 k
Transaction Summary
Install 1 Package
Upgrade 5 Packages
Total download size: 1.8 M
Is this ok [y/N]: y
Downloading Packages:
(1/6): httpd-2.4.62-7.el9_7.2.x86_64.rpm 109 kB/s | 46 kB 00:00
(2/6): mod_ssl-2.4.62-7.el9_7.2.x86_64.rpm 237 kB/s | 109 kB 00:00
(3/6): httpd-filesystem-2.4.62-7.el9_7.2.noarch.rpm 163 kB/s | 12 kB 00:00
(4/6): httpd-tools-2.4.62-7.el9_7.2.x86_64.rpm 980 kB/s | 81 kB 00:00
(5/6): mod_lua-2.4.62-7.el9_7.2.x86_64.rpm 630 kB/s | 58 kB 00:00
(6/6): httpd-core-2.4.62-7.el9_7.2.x86_64.rpm 2.4 MB/s | 1.5 MB 00:00
Total 2.9 MB/s | 1.8 MB 00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Running scriptlet: httpd-filesystem-2.4.62-7.el9_7.2.noarch 1/11
Upgrading : httpd-filesystem-2.4.62-7.el9_7.2.noarch 1/11
Upgrading : httpd-tools-2.4.62-7.el9_7.2.x86_64 2/11
Upgrading : httpd-core-2.4.62-7.el9_7.2.x86_64 3/11
Upgrading : mod_lua-2.4.62-7.el9_7.2.x86_64 4/11
Upgrading : httpd-2.4.62-7.el9_7.2.x86_64 5/11
Running scriptlet: httpd-2.4.62-7.el9_7.2.x86_64 5/11
Installing : mod_ssl-1:2.4.62-7.el9_7.2.x86_64 6/11
Running scriptlet: httpd-2.4.62-4.el9_6.4.x86_64 7/11
Cleanup : httpd-2.4.62-4.el9_6.4.x86_64 7/11
Running scriptlet: httpd-2.4.62-4.el9_6.4.x86_64 7/11
Cleanup : mod_lua-2.4.62-4.el9_6.4.x86_64 8/11
Cleanup : httpd-core-2.4.62-4.el9_6.4.x86_64 9/11
Cleanup : httpd-filesystem-2.4.62-4.el9_6.4.noarch 10/11
Cleanup : httpd-tools-2.4.62-4.el9_6.4.x86_64 11/11
Running scriptlet: httpd-2.4.62-7.el9_7.2.x86_64 11/11
Running scriptlet: httpd-tools-2.4.62-4.el9_6.4.x86_64 11/11
Verifying : mod_ssl-1:2.4.62-7.el9_7.2.x86_64 1/11
Verifying : httpd-2.4.62-7.el9_7.2.x86_64 2/11
Verifying : httpd-2.4.62-4.el9_6.4.x86_64 3/11
Verifying : httpd-core-2.4.62-7.el9_7.2.x86_64 4/11
Verifying : httpd-core-2.4.62-4.el9_6.4.x86_64 5/11
Verifying : httpd-filesystem-2.4.62-7.el9_7.2.noarch 6/11
Verifying : httpd-filesystem-2.4.62-4.el9_6.4.noarch 7/11
Verifying : httpd-tools-2.4.62-7.el9_7.2.x86_64 8/11
Verifying : httpd-tools-2.4.62-4.el9_6.4.x86_64 9/11
Verifying : mod_lua-2.4.62-7.el9_7.2.x86_64 10/11
Verifying : mod_lua-2.4.62-4.el9_6.4.x86_64 11/11
Installed products updated.
Upgraded:
httpd-2.4.62-7.el9_7.2.x86_64 httpd-core-2.4.62-7.el9_7.2.x86_64 httpd-filesystem-2.4.62-7.el9_7.2.noarch
httpd-tools-2.4.62-7.el9_7.2.x86_64 mod_lua-2.4.62-7.el9_7.2.x86_64
Installed:
mod_ssl-1:2.4.62-7.el9_7.2.x86_64
Complete!
[root@testbox ~]#
This will install the SSL module and create the default configuration file:
[root@testbox ~]# ls -l /etc/httpd/conf.d/ssl.conf
-rw-r–r–. 1 root root 8720 Nov 13 13:29 /etc/httpd/conf.d/ssl.conf
[root@testbox ~]#
3) Verify SSL Module Loaded
[root@testbox ~]# httpd -M | grep ssl
ssl_module (shared)
[root@testbox ~]#
4) Configure SSL Certificate
[root@testbox ~]# cat /etc/httpd/conf.d/ssl.conf |egrep ‘SSLCertificateFile|SSLCertificateKeyFile|SSLCertificateChainFile’
# Point SSLCertificateFile at a PEM encoded certificate. If
SSLCertificateFile /etc/pki/tls/certs/localhost.crt
SSLCertificateKeyFile /etc/pki/tls/private/localhost.key
# Point SSLCertificateChainFile at a file containing the referenced file can be the
# the same as SSLCertificateFile
# SSLCertificateChainFile /etc/pki/tls/certs/server-chain.crt
[root@testbox ~]#
5) Restart Apache
# systemctl restart httpd
[root@testbox ~]# systemctl status httpd
○ httpd.service – The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; preset: disabled)
Drop-In: /usr/lib/systemd/system/httpd.service.d
└─php-fpm.conf
Active: inactive (dead)
Docs: man:httpd.service(8)
[root@testbox ~]#
6) Verify HTTPS Port
# ss -tulpn | grep 443
7) Test Access
https://10.124.xx.xx