Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 does not end up over in

<VirtualHost *:443>
   DocumentRoot /var/www/website1

<VirtualHost *:443>
   DocumentRoot /var/www/website2
share|improve this question

Common misconfiguration of Apache, as per :

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.

share|improve this answer
+1 for correct info about SSL handshake. You should use a unique IP address for each domain. – xofer Dec 17 '11 at 0:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.