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

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?

share|improve this question
up vote 2 down vote accepted

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.

share|improve this answer
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 '09 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 '09 at 3:40

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.