0

Complete server noob trying to setup a new cloud server account here. I've only dealt with shared-hosting accounts in the past, so I don't have much experience as a network admin setting up servers.

What I want to achieve:

I have 2 domain names: primarydom.com and otherdom.com. Primarydom.com is my primary domain name of course. I want both of these to point to the same server, serving 2 different Django websites.

Questions:

  1. My host told me that I should setup my own nameserver if I want to serve different domain names. Is that the best way to go about it? If not, then how?

  2. I was given 2 IP addresses by my host, 1 public and 1 private. If I want to setup my own nameservers, do I use the public and private addresses as NS1 and NS2? Or do I just use the public one, in which case NS1 and NS2 would have the same IP address?

  3. If I have ns1.primarydom.com and ns2.primarydom.com nameservers, do I then create an NS record pointing to said nameservers for www.primarydom.com to serve a website?

I was given a CentOS server with Interworx control panel, if that helps.

Thanks a lot guys!

rabbid
  • 153

2 Answers2

1

As a relative newcomer to server administration, I would strongly suggest you find someone to handle your DNS requirements for you. I'm pretty sure you're going to have you hands full getting your box up without adding the complication of correctly setting up and managing a DNS server. there are a bunch of DNS providers in this thread.

If the cloud server you are talking about is a virtual server/VPS of some sort (which is what it sounds like) then the public IP is for internet use (i.e. both of your domains will point to that IP, and your webserver will use virtual hosts/host headers to determine which site to send the traffic to) - I'm not sure why your host has indicated you need to run your own DNS server to achieve this. I guess it depends on how you phrased the question :)

So, you would setup the A records for both domains to point to the same IP (using either your providers DNS control panel or your DNS provider of choice), and then your webserver (assuming apache) would have a virtual hosts section for each site (generally defined with the ServerName directive). If you are using a control panel, I would guess this is available within the web server configuration somewhere.

The private IP would (generally) be to communicate with other virtual servers at the same provider, should you have them - e.g. where you have a web server and separate database server, or standby/backup servers that would communicate internally.

0
  1. No you don't need to. Actually, in order to serve your domain on your own nameservers, you should have at least 2 different servers, preferable on different network segments and geographical locations. In your case, it's much better to use 3-rd pary dns hosting. Domain Name registrat usually offers one, often for free. In another case, just use any provider you'd like (google for 'dns provider' or 'managed dns serice'), for example amazon's one.
  2. No, you can't set up private ip for ns server. You must have at least 2 different public ip addresses in order to serve 2 dns servers.
  3. No, once you'll have your domain hosted somewhere, you'll need to add A (A-type, not NS) records pointing to ip of your server. Examples of the record: primarydom.com. IN A 1.2.3.4 www.primarydom.com. IN A 1.2.3.4

Here is a quite good beginner article about DNS system: http://www.htmlgoodies.com/beyond/webmaster/article.php/3473261/An-Introduction-to-DNS.htm

rvs
  • 4,225