<VirtualHost *:443> ServerName some.domain.com # SSL options, other options, and stuff defined here. </VirtualHost> <VirtualHost *:443> ServerName some.domain2.com # SSL options, other options, and stuff defined here. </VirtualHost>
Because of the nature of SSL, host information isn’t used when establishing an SSL connection. Apache will always use the certificate of the default virtual host, which is the first defined virtual host for name-based virtual hosts. While this doesn’t mean that you won’t ever be able to access the second virtual host, it does mean your users will always get a certificate mismatch warning when trying to access some.domain2.com. Read more about this at http://httpd.apache.org/docs/2.2/ssl/ssl_faq.html#vhosts2 Also, note that the configuration above isn’t something someone would normally use for SSL, which requires a static, non-shared IP address — NameVirtualHost 127.124.3.53:80 is a more likely format. However, using NameVirtualHost *:443 is common in howtos for Debian/Ubuntu.