Setup multiple SSL vhosts in apache

Edit /etc/httpd/conf.d/ssl.conf and make sure the following are enabled just underneath LoadModule ssl_module modules/mod_ssl.so

Listen 443
NameVirtualHost *:443

Then at the bottom of the file, add your virtual hosts, heres a template you can use for all your sites

<VirtualHost *:443>
ServerName yourservername.co.uk
DocumentRoot /var/www/html

ErrorLog logs/ssl_error_log
TransferLog logs/ssl_access_log
LogLevel warn
SSLEngine on
SSLProtocol all -SSLv2
SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
SSLCertificateFile /etc/httpd/certs/ca.crt
SSLCertificateKeyFile /etc/httpd/certs/ca.key
<Files ~ "\.(cgi|shtml|phtml|php3?)$">
   SSLOptions +StdEnvVars
</Files>
<Directory "/var/www/cgi-bin">
    SSLOptions +StdEnvVars
</Directory>
SetEnvIf User-Agent ".*MSIE.*" \
         nokeepalive ssl-unclean-shutdown \
         downgrade-1.0 force-response-1.0
CustomLog logs/ssl_request_log \
         "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
</VirtualHost>
Print Friendly, PDF & Email

More Like This


Categories


CentOS Linux Web Hosting
  • Post a comment