I have a number of virtual hosts in my apache installation. I have two IP adresses that I use, one for SSL only.

My default virtual host is like this:

NameVirtualHost *
<VirtualHost *:80>

Problem is that I have another vhost that looks likt this and should match SSL on the other IP only:


When I go to http://host:443 I get the default virtual host instead of the SSL virtual host. I guess this is because I use "NameVirtualHost *" instead of specifying a port.

What I am puzzled about is that when I change the default NameVirtualHost to *:80 every other virtualhost (non-ssl) stops working and every request is sent to the default vhost.

What have I done wrong?

1 Answer 1


You need to look at your ssl.conf (or equivalent) file.

When you do a /usr/sbin/apachctl graceful after making your config changes, I bet it says something to the efect that your VirtualHost is conflicting with the default SSL handler.

  • 1
    Got lots of these: [Sun Oct 25 13:36:46 2009] [error] VirtualHost :80 -- mixing * ports and non- ports with a NameVirtualHost address is not supported, proceeding with undefined results
    – phidah
    Oct 25, 2009 at 12:37
  • ahh. Right - you can have one or the other, not both. I hadn't seen that first time through your config.
    – warren
    Oct 26, 2009 at 3:40

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.