-1

I have a managed VPS, running CentOS/cPanel/WHM, with one domain currently running (let's call it testsite.com) on a pair of IPs. I got a second IP pair from my host, and a new domain name, call it realsite.com. 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 realsite.com.testsite.com, 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).

1

1 Answer 1

1

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 realsite.com 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:

realsite.com: 1.2.3.4 
#             ^- the new ip
*: 1.2.3.3 
#  ^- the old ip

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

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

3
  • 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, 2011 at 16:02
  • 1
    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, 2011 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, 2011 at 16:55

Not the answer you're looking for? Browse other questions tagged .