-1

Is it correct/safe to do the steps mentioned here: https://gist.github.com/754303 on the IP that is only used for **ns2.**mydomain.com?

Please advise.

emurad
  • 111
  • 3

1 Answers1

3

Yes, if no domains have A records that point to that address, so Apache would never be asked to serve content from it, you will lose no existing functionality by having a node instance listening there instead. You might need to check all your DNS records and those of your users to make sure none are incorrectly set to point to that address and not one of the others the machine/VM has allocated.

As an aside, if you have both of a domains name server records pointing to the same machine you are "doing it wrong". It is common to think that is doesn't matter if DNS is down for a domain if the only server responsible for the domain is down, but it can make a difference for some services. For instance mail delivery: if your server is down temporarily (or the sender's mail server simply can't see it due to a temporary routing issue at your end or theirs or somewhere between) you could lose mail that would otherwise be queued until the server is available again (as sending mail agents may see "domain not found" errors rather than "server not responding" - the latter will make them queue the mail for a later retry, the former will make them bounce it back as undeliverable - so your users could lose mail that otherwise would just be delayed). It may also affect the entries in search engines for domains hosted on your server, if their crawlers try pay a visit during an outage and respond similarly to the two different error conditions. You should have your secondary DNS hosted elsewhere, preferably with a topologically distinct provider i.e. one in a different data-centre. IIRC cPanel do a free "DNS only" version that you could host in a small VPS at another host and connect to your existing service, which may be the easiest option, otherwise look into manually configuring a bind install elsewhere as a slave to the cPanel one or look for an inexpensive hosted secondary DNS solution.

David Spillett
  • 22,754
  • 45
  • 67