GuildOfDruids
asked on
apache NameVirtualHost overlaps
I have followed the namevirtualhost settings on apache's website. I dont know where i'm getting it wrong, as the first virtualhost overrides the other.
When I type www.domain1.com it's fine, but when I type www.domain2.com it shows me the content of domain1.
When I change the order, then the domain2 overrides/overlaps domain1.
Help please!! below is the virtual hosts config.
Thanks
When I type www.domain1.com it's fine, but when I type www.domain2.com it shows me the content of domain1.
When I change the order, then the domain2 overrides/overlaps domain1.
Help please!! below is the virtual hosts config.
Thanks
NameVirtualHost *:80
<VirtualHost *:80>
ServerName www.domain1.com
ServerAlias domain1.com *.domain1.com
DocumentRoot /var/www/html/domain1
</VirtualHost>
<VirtualHost *:80>
ServerName www.domain2.com
ServerAlias domain2.com *.domain2.com
DocumentRoot /var/www/html/domain2
</VirtualHost>
ASKER
Yes but want if I type domain1.com it should show me the content inside domain1 folder and same for domain2, how is that possible?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
typooooo, my bad. I spelled domain name wrong. damn. Thanks alot
look here(http://httpd.apache.org/docs/1.3/vhosts/examples.html#purename)