Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a managed VPS, running CentOS/cPanel/WHM, with one domain currently running (let's call it on a pair of IPs. I got a second IP pair from my host, and a new domain name, call it I want to use cPanel/WHM to configure my VPS to run both domains (on separate IPs). I'm also using nginx, not Apache, but I don't expect a problem configuring it. :)

One issue - looking at HostGator's cPanel documentation, the only options I can find, are for creating an add-on domain (or parked domain/subdomain). However, it describes add-on domains as really being sub-domains. So if I followed those instructions, I'd actually have, which would be presented to the world as two sites, but isn't really two separate domains on separate IPs.

  • My main question is - how do I use cPanel/WHM to configure two separate domain names/IPs?

Some secondary questions: Is it possible to do this in cPanel/WHM? If not, and I try to configure the second domain by hand, will it conflict with cPanel/WHM in any way?

I have found several somewhat-related questions, but they are generally not what I'm looking for (example, how not to use cPanel).

share|improve this question

closed as off-topic by HopelessN00b Jan 13 '15 at 22:10

  • This question does not appear to be about server, networking, or related infrastructure administration within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

This question appears to be off-topic because it is about working with a service provider's management interface, such as cPanel. – HopelessN00b Jan 13 '15 at 22:10
up vote 1 down vote accepted

If you have access to the WHM then you can just create a new account (using the equally named menu in the WHM) and enter as domain. Then use "Change Site's IP Address" to assign the new IP (only one IP is possible).

If you don't have access to the WHM then I would add it as Addon-Domain, it shouldn't lead to any problems if you don't use the local DNS-server on your VPS but rather a separate one provided by your hoster (I don't know how HostGator handles that). This should be suffice to ensure that the Mailserver accepts mail for that domain. For outgoing mail you probably have to edit /etc/mailips and add something like that - if not present yet: 
#             ^- the new ip
#  ^- the old ip

This should ensure that the reverse lookup on receiving mailservers yields otherwise you might get caught in some SPAM-filters.

Edit: I completely forgot: if that doesn't help you, why not ask HostGators support?

share|improve this answer
Yes, I do have access to WHM, I didn't think to mention that. As for asking HostGator - I might, just to see what they say. In general, their support is adequate - as long as it's something relatively standardized. I was actually expecting that this might not be possible with cPanel (or WHM) and HG wouldn't have an alternative. Plus, I consider the SE sites slightly more authoritative. :) – Cyclops Sep 22 '11 at 16:02
Interesting - looking at WHM now, I realize that cPanel is per-account/per-domain. One of the things that I haven't found yet is a good high-level overview of WHM/cPanel, explaining how they are related to domains, etc. My understanding of them is definitely limited. (I've thought about posting a question asking for a high-level overview, but wasn't sure if the question would be too general :) – Cyclops Sep 22 '11 at 16:24
Well you can have multiple domains in one account - either as a parked domain which has the same document root as the accounts main domain, or as a addon domain which has his/her (sorry english pronoun fail) own document root. Problem is, you can't set the IP of an addon/parked/subdomain without some serious hackery. So it's easier to just create a new account and assign the IP to that. Maybe that helps a little: WHM Docs. – vstm Sep 22 '11 at 16:55

Not the answer you're looking for? Browse other questions tagged or ask your own question.