Apache default not working correctly

3 posts / 0 new
Last post
#1 Fri, 06/19/2009 - 10:47

Apache default not working correctly

Whenever there is a domain name pointed to the server that does not have a match in apache, apache is giving the index page of one of the websites instead of the /var/www/index.html page that I created, which is in the DocumentRoot directory of the 000-default site. Is there a way I can fix this?

Fri, 06/19/2009 - 17:27
Joe's picture

You have a belief about Apache and "default" that is invalid. ;-)

An Apache configured for virtual hosting no longer has a "default" website. Apache uses the "first best" match when in virtual hosting mode. There are ways to make one particular site the "first best" match for most circumstances (make sure it is the first one read by Apache in the configuration file), but there is no such thing as a "default" website, as far as Apache is concerned.

You'll want to read the "Wrong Site Shows Up" section of the troubleshooting guide:


If that doesn't clear up what's going wrong, let us know, and we'll try to point you in the right direction.


Check out the forum guidelines!

Tue, 06/23/2009 - 09:27

Thanks Joe. You were on target, as usual. /etc/apache2/sites-available/default had a * in the <VirtualHost *> tag. Changed this to <VirtualHost (IP Address Goes Here:80)> , reloaded apache, and the correct default page came right up. This issue is closed.


Topic locked