How to change the WHM/cPanel main IP address [cPanel/WHM: List Account shows the incorrect IP]
If you can't change the ip for some user account in usual way (WHM->List account -> Ichange sites IP address.)
This issue can occur after migration for example. We assume that httpd.conf contains actual IP's. So it's only "display" issue.
The best way to set IP is using WHM feature "Change IP" under corresponding cpanel account. Just expand account features:
Just select proper IP from the list.
If you have changed the main WHM/cPanel server IP and can;t find this under the IP lists. You need to set this new IP in the main WHM server settings:
Go to Server Configuration-> Basic cPanel & WHM Setup and set new ip in the IP address filed " The IP address (only one address) that will be used for setting up shared IP virtual hosts.":
That's all. For sure you can restart httpd service with "service httpd restart" from SSH, but usually it's not necessary.
Alternatively you can check /edit the config files on the serever. or use commands to set ip like described below.
Here is the conf files you should check and change the IP on actual:
/var/cpanel/users/<username> // change under the "IP=" line
After you have checked all files and made changes where it was neccessary you should update database cache. Run next commands:
Also you need to check the <VirtualHost> directive in Apache httpd.conf file and set correct IP's there.
Note that cPanel could rewrite the httpd.conf so your changes will be lost . do not edit this files if you not sure.