In managing servers you always come across something that is not the way you want it. The admin before me used 1 IP address per domain, which would be fine, if there was a need for that. The reason behind that was to reduce competitor spying, but having 30 sites on their own IP address that aren’t doing anything is pointless.
Using CPanel it is not easy to take a site that has a dedicated IP and move it to a Reseller account and use the new IP address. Sure you can reassign it to a new Reseller, but the IP is a different matter. I found that I had to do a combination of CPanel commands, and then some manual (shell) stuff.
I am assuming that you are familiar with editing server config files and do not offer command line suggestions on how to do that.
If you are not familiar with shell commands, GET SOMEONE ELSE TO DO IT – I’M NOT RESPONSIBLE FOR YOUR SERVER.
Lets assume that we are moving domainum.com from a dedicated site and Ip to a Reseller account under primary.com
Make sure that primary.com is a reseller.
Home >> Account Functions >> Modify an Account
Make sure that primary.com has a dedicated IP, remember or write down this IP you will be using it multiple times in the next few minutes.
Home >> Resellers >> Manage Reseller’s main/Shared IP
Select the IP and Save.
Also make sure that they can modify DNS entries for its reseller accounts:
Home >> Resellers >> Edit reseller privileges & nameservers
Restrict IP’s to primary.com. This may not be needed, but since we are forcing domains to a specific account lets make sure they should be there.
Home >> Resellers >> Manage reseller’s main/shared IP
and check that primary.com has the IP delegated:
Home >> Resellers >> Manage reseller’s IP Delegation
Change the ownership of domainium.com to primary.com:
Home >> Resellers >> Change ownership of an account
Login to CPanel of primary.com:
and select domainium.com from the drop down. Then select the Advanced DNS Zone Editor icon.
Edit the IP address to match primary.com.
Log on to server and check:
for an instance of domainium.com, if there is one delete it or comment it out.
Edit the apache config file httpd.conf:
Look for the VirtualHost listing for domainium.com and change the IP address to that of primary.com.
Check your work:
If there are no issues, restart Apache:
Modify the IP references for domainium.com in:
and /etc/proftpd.conf (this depends on your config)
Update CPanel so it doesn’t overwrite your changes:
If everything worked comment below.