When changing the hostname on a cPanel server, we've seen two problems surface.

1. If you see that the license becomes invalid.
2. The /etc/sysconfig/network file is typo'd, resulting in a broken network configuration after the next reboot.

After changing the hostname, you can take the following steps to fix this.

1. Log in to your server via SSH and execute the file /usr/local/cpanel/cpkeyclt . This will correct the licensing.

2. You have to log into your web server via SSH and review the /etc/sysconfig/network file. It might look like this:

----------------------------------------------------------------------------------------------
#/etc/sysconfig/network
NETWORKING=yes
DOMAIN=com
GATEWAYDEV=eth0HOSTNAME=server1.yourdomain.com
DOMAINNAME=yourdomain.com
Fix this by moving the HOSTNAME=server1.yourdomain.com to a newline like this:
----------------------------------------------------------------------------------------------

----------------------------------------------------------------------------------------------
#/etc/sysconfig/network
NETWORKING=yes
DOMAIN=com
GATEWAYDEV=eth0
HOSTNAME=server1.yourdomain.com
DOMAINNAME=yourdomain.com
----------------------------------------------------------------------------------------------

Good luck!