Help with virtual hosts
Date: 12/15/05
(Apache) Keywords: no keywords
Ok, I'm trying to set up domain based virtual hosts on my system. Now this seemed like it should be rather easy, which is why I'm confused why it's not working. What happens is the first host listed gets displayed for everything, no matter what I try to do. If I swap the order, than that gets displayed.
# Named VirtualHosts
NameVirtualHost *
#[VirtualHost *]
#ServerName www.zenten.ca
#ServerAlias zenten.ca
#DocumentRoot /home/waterspyder/www
#[/VirtualHost]
[VirtualHost *]
ServerName waterspyder.zenten.ca
DocumentRoot /home/waterspyder/waterspyder
[/VirtualHost]
[VirtualHost *]
ServerName icarian.zenten.ca
DocumentRoot /home/waterspyder/icarian
[/VirtualHost]
The one line is commented out just so I can get the default page I want showing up, if I remove the comments then it serves pages from /home/waterspyder/www. I replaced the greater and less than symbols for this post with [ and ] so it will show up properly here.
Any help would be appreciated.
Source: http://www.livejournal.com/community/apache/28392.html