Perhaps we've all grown fat and lazy in our old age and never tried it. Well actually for me thinner and lazy but you get the idea.
I suspect it goes something like:
- Changeover DNS zone files to new IP addresses (edit them and update the serial numbers). This could be done manually, or with a tool to do it. It's not that hard to write a tool to do it. [But djbdns would be a much better solution
] [ignore that comment!!] You could probably get away without increasing the serial numbers if you don't have an off-machine secondary server (which doesn't help much anyway) and you do a "service named restart" to reload the zones when you're done editing.
- Edit /etc/httpd/conf/httpd.conf and modify the VirtualHosts container lines for each affected site. You should initially put *both* the new and the old IPs into the container lines, so that apache will listen on *both* new AND old IPs for the affected sites. Otherwise the sites will be unavailable until DNS propagation completes - probably not something you want! The reason for this is that the cpanel httpd.conf explicitly states which IPs each website will respond to in VirtualHosts lines, and you get a cpanel "no site configured" if you try to access the site on IPs other than those defined in httpd.conf. The VirtualHosts lines are the lines controlling which IPs will respond to which site, and they should go from what they are currently, ie with one IP, something like:
Code:
<VirtualHost 72.257.212.226>
(ie just the old IP) to
Code:
<VirtualHost 72.257.212.226 72.257.212.227>
(ie both the new and old IPs while you wait for DNS to settle), to:
Code:
<VirtualHost 72.257.212.227>
(ie just the new IP after DNS propagation has settled). You want to wait at least 72 hours for propagation to complete - some large ISPs offer special cache machinery which ignores TTLs as a trade-off for speed, so they'll need a good 24 hours to clear out the old IP. Note that other services like mail and ftp (AFAIK) don't care about the IP on which the request arrives so shouldn't cause problems.
BTW, if you want to change *all* the sites on the server, go for cpanel's wonderful IP migration Wizard. You may have to add NameVirtualHost entries to httpd.conf for each new IP after it completes, but that's about it (except, give it a full 48 hours, 72 is better, after the first pass before you "complete" the operation in WHM). This tool is only lacking the ability to do migrations of subsets of the system (eg by reseller) and the ability to automatically complete an operation ("at" is your friend).
Don't try and change the server main IP since the cpanel licence is generated off it, and cpanel will probably stop working rather suddenly and you may end up unable to log in via ssh.
I don't really know for sure whether this is all that's involved. There may be something in /var/cpanel so a good "grep -r 72.257.212.226 /var/cpanel /usr/cpanel" would probably help in discovering that. Perhaps someone more knowledgeable than myself would care to comment.
Hey let us know how you go with this, if it you try it manually and it works out for you I could write some perl/PHP to automate it, possibly even a WHM addon if I get overexcited or have a sleepless night.... anybody done this and wanna comment on my above methods?