0

We have 2 sites hosted on an Apache server. everything with port80 is working fine, but when we try to connect using https we are redirected to the first document directory of port443 regardless of which URL we use. we have a SAN(UCC) SSL certificate that's set up properly for both domains. can any one assist us in finding a solution so https://website2.com does not end up over in https://website1.com

<VirtualHost *:443>
   ServerName website1.com
   DocumentRoot /var/www/website1
</VirtualHost>

<VirtualHost *:443>
   ServerName website2.com
   DocumentRoot /var/www/website2
</VirtualHost>

1 Answer 1

1

Common misconfiguration of Apache, as per http://wiki.apache.org/httpd/CommonMisconfigurations#Multiple_SSL_name_based_virtual_hosts_on_the_same_interface :

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.

What you want to achieve is called "SNI", is possible only when using a 2.2.12 or later web server, built with 0.9.8j or later OpenSSL and is only compatible with recent browsers.

1
  • +1 for correct info about SSL handshake. You should use a unique IP address for each domain.
    – xofer
    Dec 17, 2011 at 0:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .