How to setup cPanel when using Floating IP ?

December 2, 2015 1.1k views
DNS Control Panels CentOS

I am using one droplet with CentOS and WHM/cPanel installed on them. Also I assigned a Floating IP to that droplet. In WHM i created two accounts for my two domains. At the registrar I pointed them to the digitalocean NS servers. In the domain section of digitalocean I created entries for the two domains. Both of the domains respond at ping requests from the floating IP. The problem is that when I try to access the domain by http I land on the cgi-sys/defaultwebpage.cgi page.
Please if you could tell me what further settings must I operate in WHM so that both of my domains work.
Thank you in advance.

2 Answers


If this is only a single server setup, using a floating IP address really isn't going to do much or make a configuration any more reliable. It'd be better to utilize the primary IP address of the Droplet and not tie domains to an IP that isn't meant to be used as a dedicated IP for your Droplet.

The purpose of a floating IP is to simplify HA (High-Availability) setups by allowing you to switch from one server to another in the event of downtime. The issue here is that, if you don't have a system in place to make this switch (i.e. API integration with DigitalOcean's API), nothing will happen and if the Droplet is down, it's still down (just as it would be on the primary Public IP).

For this solution to effectively work, you'd need a second server setup (thus requiring a second cPanel license) which replicates data from the primary near-instantly. If you were to separate web & database (thus 2 Droplets), then you'd ideally need 4 droplets (still 2 cPanel licenses as the database servers do not require a cPanel license for this particular type of setup) as you don't want to be stuck in a position where your web servers are up but your sole database server is down (which can happen).

Additionally, you would realistically need 1-2 more Droplets acting as proxies, thus telling traffic where to go (and, of course, to monitor the "health" of your two web servers and two database servers, thus preventing traffic from being sent to a downed server).

That said, if you do choose such a path, the second server would need to be identical to your primary (and this isn't a native feature for cPanel, so you'd have to setup mirroring and ensure that all aspects are replicated over, including any changes that cPanel makes such as updates, upgrades, config etc).


That said, cPanel uses Bind last I recall, so the DNS Zone for Bind (which can be modified through WHM) needs to be a mirror of your DNS zone for DigitalOcean, so you'd need to make sure that the NS, A, CNAME, TXT and all other DNS records match 1-for-1.

You would also need to verify the IP's for each domain on the cPanel server. Since cPanel will, in most cases, auto-configure to the primary IP of the server it's installed on (which wouldn't be the floating IP), if you're trying to use the floating IP when it's assigning the Public IP to domains, then you're going to run in to issues there.

@jtittle I wish to thank you for the detailed answer. The scenario wrote by you is describing the professional approach to the problem. I managed to bind the two websites hosted by the server to the floating IP and now everything works perfect.

Have another answer? Share your knowledge.