Hi there,
At the meantime I'm struggling with a problem regarding my virtual servers and name server addresses.
Here is the problem,
Suppose my domain is abc.com, and my host name is hostx.abc.com.
name servers are
dns1.abc.com -> xxx.xxx.xxx.149
dns2.abc.com -> xxx.xxx.xxx.100
then I created a vserver for abc.com and after I added another vserver for a second domain. Both websites worked fine. And if I type one of the name server addresses in a browser, it'll load the main domain's (abc.com) website (What I exactly wanted). Then I created an A record for hostx.abc.com to point xxx.xxx.xxx.149 (main IP). After the main site was also loaded when I try to reach the host name(hostx.abc.com) from browser(no problems). also both IPs were loading the main site content at that time.
Now the problem comes,
Later I created a subserver for a sub domain (sub.abc.com) and after that the story was changed.
When I type these addresses in the browser
dns1.abc.com => loads the content in sub.abc.com
dns2.abc.com => loads the apache default page (It Works page)
xxx.xxx.xxx.149 => loads the content in sub.abc.com
xxx.xxx.xxx.100 => loads the apache default page (It Works page)
hostx.abc.com => loads the content in sub.abc.com (Because hostx.abc.com points to xxx.xxx.xxx.149)
But I don't want like this way. I want the main site (abc.com) contents to load whenever an user try to reach either from IP addresses of the server, name servers of the server or host name(hostx.abc.com) of the server. This problem is very weird. I tried to find out if there is an virtual server order in apache confs, but there were not. Is there any order in /etc/apache2/sites-enabled? But this thing never happend when I created the second virtual server. Only this happened after I created the sub server.
Can someone help?
PS:- Except this problem, all the DNS and other servers woks fine.
I'm using Virtualmin 3.87.gpl and Ubuntu 10.04LTS x86_64 for the server.
Howdy,
But I don't want like this way. I want the main site (abc.com) contents to load whenever an user try to reach either from IP addresses of the server, name servers of the server or host name(hostx.abc.com) of the server.
Each website is associated with a particular IP address on your server. And for each IP address, one website is considered the "default".
You can define which website is the default website for a given IP address by going into Server Configuration -> Website Options.
One Virtual Server can't be the default website for two IP addresses.
What you would need to do is create a Virtual Server on the other IP address, and either place a website there that you want as the default, or at least setup a redirect so that it directs all users back to your preferred website.
-Eric