Apache shows another (random) website

LasseTK

Active Member
Apr 15, 2005
33
0
156
I have a strange problem. If I enter www.domain1.com then domain1.com is shown correctly. However if I enter mail.domain1.com it shows the domain2.com website!?

Actually no matter what i type in after mail.* it will always show the website of domain2.com.

Any ideas?
 

LasseTK

Active Member
Apr 15, 2005
33
0
156
I have fixed this issue on the main shared IP now by running /scripts/rebuildhttpdconf

I however have a second shared IP where a wrong website is still shown instead of the default web site page.

Please provide inputs if you have any!
 

madaboutlinux

Well-Known Member
Jan 24, 2005
1,051
2
168
Earth
Check the Apache configuration file, the set a VirtualHost entry for the second Shared IP to point to the default directory of the domain and also place the "NameVirtualHost" entry just above that VirtualHost entry. Remove any other NameVirtualHost entry for the second IP and restart httpd.