I'm trying to configure apache 2.2 so that I can use two IPs. One for name based virtual hosts which should all use the same ssl-key and the other one for just one ip based host which should be using an other ssl-key. But it seems that when ever I get either the ip based or name based host to work the other one breaks.

Can someone tell me how to do this on a debian system or at least point me in the right direction?



SSL does not allow you to run name based virtual hosts. This is because the header section that contains the virtual hostname request is encrypted with the rest of the page request. Therefore, the webserver cannot determine what virtual host you are asking for until it decrypts your request; a real chicken and egg situation. This is why there is a limitation of one SSL Certificate per IP Address.

  • 2
    Actually modern browsers and web servers support this through SNI. – joschi Apr 14 '10 at 5:51
  • Yes, this is true, but does every person using the internet use a modern browser? – monkee Apr 14 '10 at 11:33

You are probably specifying the vhosts as *:443 not IP:443

What comes up in the apache error logs?


After fiddling the conf files for some time it seems to work now, the mixing ip- and name-based part of the problem that is. As for the ssl part I think I'll wait for Debian to update apache.

Thanks for your effort.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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