Install Mod SSL:
yum install mod_ssl
We need to create a new directory where we will store the server key and certificate:
Create a Self Signed Certificate:
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/httpd/ssl/apache.key -out /etc/httpd/ssl/apache.crt
Open up the SSL config file:
Find the section that begins with
Uncomment the DocumentRoot and ServerName line (it should be the same as the common name on the certificate):
Find the following three lines, and make sure that they match the extensions below:
You are done. Save and Restarting the Apache server.
Done. In your browser, type https://example.com to view the new certificate.