2

I am not really skilled in Server Administration so forgive me if I do not know how to call or term server stuff properly but I will try to explain it as much as I can.

So I have a domain name called domain.com which has two versions. Both versions of the website are hosted on different servers. The other domain I am concerned about is the one in ISPConfig 3. Let's call the one hosted in ISPConfig 3, Version2.

Right now, domain.com points to Version1. So what I do to access Version2 is use my hosts file to point the IP Address of my server to domain.com. However, the website that loads when I did the said step is that domain.com points to a different website in ISPConfig. I have 3 websites in ISPConfig 3 and the one that loads is the one I have created the most recent.

What could be the issue here? Please educate me about this server stuff. Advanced thanks!

Edit : My server is Apache by the way.

ejandra
  • 336
  • 2
  • 4
  • 15
  • which web server you're using on your server – Mohtisham Zubair Jan 22 '17 at 16:17
  • @Mohtisham edited my post to add my web server. – ejandra Jan 23 '17 at 11:21
  • you need to get the vhost.conf file most probably in path /etc/httpd/extra.../vhost.conf or /etc/httpd/sites-availables/???.conf sometimes multiple entries could be made in vhosts.conf file or separate file for each domain It is most likely the first domain entry which is getting load for your case – Mohtisham Zubair Jan 23 '17 at 11:34
  • @Mohtisham I think the issue really happens because the first domain entry is getting loaded. How do I resolve this Sir? – ejandra Jan 24 '17 at 09:20
  • Actually the vhosts file which I mentioned earlier responsible for mapping request to particular domain if that exists. And if not there then they will load the first one (mostly). I try to explain you by an example though may be I'm not good making others understandable. Suppose your server is at IP say 113.129.20.14 and it has entries for three different domains namely 1) www.ejandra.com 2) dev.ejandra.com 3) test.ejandra.com – Mohtisham Zubair Jan 24 '17 at 12:57
  • and in your config you're putting 113.129.20.14 test.ejendra.com which does'nt exist on the server as it is some typo mistake or anything it could be then what could happened that you might see loading of www.ejandra.com which is the latest one this is what normally happened hope that give a bit understanding of what is happening – Mohtisham Zubair Jan 24 '17 at 13:01

2 Answers2

1

It happened to me as well.

My case: I had been using my domain, let's call it abc.com with ISPConfig 3.1 without any issues. I registered a new domain name xyz.com and pointed it to my server running ISPConfig 3. After the successful DNS propagation when I visited xyz.com it showed the contents of abc.com.

Solution: This issue drove me insane until I found that I misspelled the domain name in my site list in ISPConfig. I deleted this site and created a new one with the correct spelling and voila it got fixed.

What's happening here? When you type xyz.com in your browser it goes to the DNS server and requests for translation. The translated IP is actually the IP of your server. Your server looks for virtual hosts and looks for xyz.com entry. When it fails to find the vhost entry for xyz.com it automatically shows the content of abc.com [That's my understanding of it, please correct me if I'm wrong or missed anything]

Saif
  • 305
  • 2
  • 12
0

I had my domains also pointing to the wrong server although mine started because I pointed the DNS zone wrongly. There are few checks you could do but take note, the lesser you go into messing with Apache hosts files the better for you. From my observation:

  1. To start with, do ensure you are running similar versions of ISP config on all servers, so try upgrading all servers
  2. While creating your DNS zone (zone for domain.com), if you have multiple DNS servers (all functioning) just select the main one, the section "IP" is the crucial part; if domain.com is supposed to point to ServerA, then select ServerA IP. Also remember you need to give some few minutes for changes to take effect
  3. Run update and upgrade on all your servers (very important) and finally you can follow up with DNS tools like mxtoolbox(mxtoolbox.com) for more details. Hope it helps
DAVID AJAYI
  • 1,912
  • 20
  • 13