- Ensure that the Apache mod_ssl module is installed on your system by running the following command:
yum install mod_ssl
Copy your SSL certificate file and the certificate bundle file to your Apache server. You should already have a key file on the server when you have generated your certificate request.
Open the Apache configuration file in a text editor. Apache configuration files are usually found in /etc/**httpd. The main configuration file is usually named httpd.conf. In most cases, the blocks will be at the bottom of this httpd.conf file. Sometimes, you will find the blocks in a separate file in a directory like /etc/httpd/conf.d/.**
Edit the virtual host entries in the /etc/httpd/conf.d/ssl.conf file to include the certificate files and virtual host information that each domain should use. For each virtual host, replicate the configuration shown below. Replace each mention of cinnox-demo.com with your own domain.
<VirtualHost *:443> SSLEngine On SSLCertificateFile /etc/pki/tls/certs/cinnox-demo.com.crt SSLCertificateKeyFile /etc/pki/tls/private/cinnox-demo.com.key SSLCACertificateFile /etc/pki/tls/certs/root-certificate.crt ServerAdmin [email protected] ServerName www.cinnox-demo.com DocumentRoot /var/www/html/cinnox-demo.com/ ErrorLog /var/log/httpd/cinnox-demo.com.error.log CustomLog /var/log/httpd/cinnox-demo.access.log combined </VirtualHost>
Save your configuration file.
- Restart Apache.
systemctl restart httpd
Updated about 1 year ago