sub-domain on different server?

Rebecca

Verified User
Joined
May 20, 2006
Messages
36
I've got a very high traffic site that's maxing out on a dedicated server and I'm thinking that one possible solution might be to split up some of the traffic onto another server.

Can I have a domain on one server and a subdomain on another server? If so, what would I do in terms of DNS settings on each one? Or would I have to get a different domain for the other server? Or would I just access the files on the new server through the IP address somehow?

I'm clueless... anybody have any clues?
:)

Thanks,
Rebecca
 
Set up the subdomain on the different server, but as it's own domain; in other words set up sub.example.com instead of example.com.

Then in the zone file for example.com on your system hosting the main domain, put two NS records, for the subdomain, into the zone file for the main domain, pointing to the nameserver running on the server hosting the subdomain.

Jeff
 
thanks... I'm in a tad bit over my head here, but just knowing that it can be done is the main thing.

So, I'm assuming I should have Direct Admin on both machines...
Can I access this "zone file" though Direct Admin? And what would I sent the nameservers on machine 2 to?

I think part of my problem is that I'm totally confused about what nameservers are... when I got my server the host set it up so that the nameservers are called ns1.mydomain.com and ns2.mydomain.com ... and then at the registrar it also says ns1.mydomain.com and ns2.mydomain.com. So are these "nameservers" located on my server or are they somewhere else, or does it depend on how the host set it up?

So, on server number two, would I have nameservers that said ns1.sub.mydomain.com/ns2.sub.mydomain.com or would they be the same ns1.mydomain.com/ns2.mydomain.com or something completely different?

I fear I am displaying the true depth of my ignorance here, but I'd be grateful if anybody can help me understand this.

Thanks!
Rebecca
 
You honestly dont have to setup more nameservers for a subdomain. You also do not need directadmin on the second server if you do not want to. On your first server you can go into dns management and forward the dns "A" record to the ip address of the second server. I honestly think it would be pointless to have more nameservers setup on the second machine. Only top level domains (TLD's example: yourdomain.com) need nameservers so just creating the dns record for the subdomain on the first machine will surfice what you need to be done.

Also if you want mail setup you can do that as well with your dns management on the first machine. Then someone could email [email protected]. You may have to edit the dns zone file on your first machine manually to set this up correctly.

But theoretically dns does not even have to be hosted on the same machine as where you wish to host websites and email. Just update your dns to the correct ip and subdomain and you will be set.

If you are the administrator yourself you can also do load balancing with the Apache webserver if you didnt know about that. You would have to research into setting it up but it its also a possiblity.

As far as your question what are nameservers. Nameservers are just servers used to point actual host names to ip addresses. They were designed so that when someone wants to go to a website like www.google.com that they do not have to memorize an ip address to get there, but just memorize the words which is much easier.

Please ask if you have further questions.

Thanks
 
Thanks for the info... sounds like I can do what I want to with no problem... I'll just have to wait until I get the second server up and running. Just a stupid question here, this will all work even if the two servers are on completely different networks (ie different hosts) won't it?

In terms of tweaking the Apache Load... I'd love to hear your thoughts and suggestions. Here is a link to that post: http://www.directadmin.com/forum/showthread.php?s=&postid=75796#post75796

(don't know if that link will work or not... the post is under DirectAdmin Forums > Technical Discussion > Apache (WWW) > edit httpd.conf file?

Thanks,
Rebecca
 
chatwizrd and I disagree on how to handle the DNS, and that's fine, since both ways will work.

The reason I suggested it the way I did is because then your second server and the world will see exactly the same DNS. If you do it chatwizrd's way they will only if you make sure your DNS on the second server is non-cacheing and your /etc/resolv.conf file points to nameservers NOT on either of your servers. While is the way DNS should be done, it's only very recently that many small webhost companies have taken the trouble to do it this way, and your systems are probably not configured that way by default :) .

It doesn't matter if the two servers are on two different networks.

Does anyone (chatwizrd ???) know is Rebecca can use DA to run the same DNS on both servers if the main domain is on one system and the subdomain on another? I think so, but I've not tested it.

And that way Rebecca will have the advantage of redundant DNS on two networks.

Jeff
 
jlasman said:
chatwizrd and I disagree on how to handle the DNS, and that's fine, since both ways will work.

The reason I suggested it the way I did is because then your second server and the world will see exactly the same DNS. If you do it chatwizrd's way they will only if you make sure your DNS on the second server is non-cacheing and your /etc/resolv.conf file points to nameservers NOT on either of your servers. While is the way DNS should be done, it's only very recently that many small webhost companies have taken the trouble to do it this way, and your systems are probably not configured that way by default :) .

It doesn't matter if the two servers are on two different networks.

Does anyone (chatwizrd ???) know is Rebecca can use DA to run the same DNS on both servers if the main domain is on one system and the subdomain on another? I think so, but I've not tested it.

And that way Rebecca will have the advantage of redundant DNS on two networks.

Jeff

Well you are assuming she already has directadmin on the second server. I have provided a way to not have to deal with all that stuff. She never mentioned she wanted redundant dns or would even run directadmin and/or named on the second server. She was only asking if it was possible to host the sub domain on another server.
 
Back
Top