About
mod_ssl Apache - Module
Prerequisites
- A private key and a certificate. For a self signed certificate, see Cryptography Certificate - How to self-signed a Certificate (for a test or internal server)
Steps
When Apache with mod_ssl is installed, it creates several directories in the Apache config directory.
- Copy the key material to the configuration directory
cp server.crt /usr/local/apache/conf/ssl.crt
cp server.key /usr/local/apache/conf/ssl.key
- Configuring SSL Enabled Virtual Hosts
SSLEngine on
SSLCertificateFile /usr/local/apache/conf/ssl.crt/server.crt
SSLCertificateKeyFile /usr/local/apache/conf/ssl.key/server.key
SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
CustomLog logs/ssl_request_log \
"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
- Restart Apache and Test
/etc/init.d/httpd stop
/etc/init.d/httpd stop