Setting up SSL virtual hosts in Apache
This is part of my server working config. Hope you will it handy.
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName xxx.com
ServerAlias www.xxx.com
DocumentRoot /srv/www/htdocs/xxx.com
ErrorLog /var/log/apache2/xxx.com-error_log
CustomLog /var/log/apache2/xxx.com-access_log vhost_common
<Directory "/srv/www/htdocs/xxx.com">
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName mail.xxx.com
Redirect / https://mail.xxx.com/
</VirtualHost>
<IfDefine SSL>
<IfDefine !NOSSL>
<VirtualHost _default_:443>
ServerAdmin [email protected]
ServerName mail.xxx.com
DocumentRoot /srv/www/htdocs/roundcube
ErrorLog /var/log/apache2/roundcube-error_log
CustomLog /var/log/apache2/roundcube-access_log vhost_common
CustomLog /var/log/apache2/roundcube-ssl_log ssl_combined
SSLEngine on
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
SSLCertificateFile /etc/ssl/xxx/apache2.crt
SSLCertificateKeyFile /etc/ssl/xxx/apache2.key
SetEnvIf User-Agent ".*MSIE.*" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
</VirtualHost>
</IfDefine>
</IfDefine>