How to install Apache mod_ssl in CentOS / RHEL? What to do if ssl.conf file is missing in the server?

Tech Insights

mod_ssl is an Apache module that provides SSL v2/v3 and TLS v1 support for the Apache HTTP Server. ssl.conf is the Apache server configuration file that helps to enable SSL support. Following is the location of ssl.conf file:

/etc/httpd/conf.d/ssl.conf

Absence of ssl.conf file means you need to install mod_ssl to enable HTTPS or SSL in your Apache server. Execute the following command to check if mod_ssl is installed:

rpm -qa | grep mod_ssl

If installed, the above command should display the mod_ssl module with version. Otherwise, just run the following command to install it:

sudo yum install mod_ssl

mod_ssl will be installed and the configuration file will be placed in /etc/httpd/conf.d/

However, if you find that mod_ssl is installed but the ssl.conf file is missing, just try to reinstall mod_ssl with:

sudo yum reinstall mod_ssl

Related read

A list of top SSL Certificate Authorities and their prices