Apache: Install SSL on Virtual Host

September 27th, 2009 by jeremychone

Here is the minimum configuration to enable SSL

Load the module and configure the certificate

LoadModule ssl_module modules/mod_ssl.so
Listen 443
SSLProtocol all -SSLv2
SSLCipherSuite HIGH:MEDIUM
SSLCertificateFile /path/to/domain-certificate.crt
SSLCertificateKeyFile /path/to/domain-key.key
SSLCertificateChainFile /path/to/bundle-certificate.crt
SSLCACertificateFile /path/to/bundle-certificate.crt

….

NameVirtualHost *:443
<VirtualHost *:443>
DocumentRoot /path/to/html/
ServerName www.mysecuredomain.com
SSLEngine on
</VirtualHost>

Pre-requisites:

  1. Disable your /etc/httpd/conf.d/ssl.conf by renaming it to ssl.conf.disabled (otherwise, Apache will take the properties from this file, and it can get quite confusing).
  2. Open your firewall for https protocol
  3. Get a certificate (Godaddy have the cheapest one, especially for wildcard ones)

Related links

Leave a Reply