Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have run into something I find odd. I am using Apache/2.0.54

If I try to access a non existent sub domain on my server it will resolve to the primary domain. For example going to

will resolve to .

If I enter a valid subdomain e.g.

it will resolve to the proper sub domain.

I am thinking this is due to a server confg of some kind but I'm not sure what. Googling didn't really help me but that may be because I don't know what to call this exactly.

Could anyone suggest why this is happening? Thanks much!

share|improve this question

1 Answer 1

up vote 3 down vote accepted

On a NameVirtualHost enabled address/port combination, the first matching <VirtualHost> to load is considered the default; requests that match no other hosts are sent to it. See your current configuration with apache2ctl -S.

If you want to avoid this behavior, make the first to load a dummy vhost which serves no content.

share|improve this answer

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.