Multiple virtual servers resolving to incorrect FQDN

Hello I have created 2 virtual servers using virtualmin as follows: VS1 domain name > domain1.com VS2 domain name > domain2.com

Using FTP I added an index.html file in the public_html folder for both the domains above.

I have also configured name servers for the 2 domains above with my registrar and have pointed the DNS records to the server IP

My Server Admin guy has also created local name servers using BIND on the server. So now i have in effect 3 name servers: 1 > locally created by server admin using BIND i.e. ns1/ns2 on domain1.com (NOt sure if this is needed) 2 > ns3/ns4 created on registrar site for domain1.com. 3 > ns1/ns2 created on registrar site for domain2.com.

issue is that when i go to www.domain1.com > I see the correct index.html, but when i go to domain1.com (without www), the domain2.com index.html gets loaded

This works fine for domain2.com and www.domain2.com > correct index.html loaded.

Issue is only with domain1.com > loading domain2.com index.html

Any help would be much appreciated

Status: 
Active

Comments

Some things you can check out to verify they are configured correctly:

When you go to "Webmin / Servers / Apache Webserver", you get a list of all virtual hosts defined in Apache. You should see your two domains, with the server's IP address and port 80.

Then, for your two domains, go to "Virtualmin / Services / Configure Website / Edit Directives". There you should see the directives "ServerName domain.tld" and "ServerAlias www.domain.tld".

For further tests, it would help if you could tell us the actual domain names in question, so I can do some nameserver digging.