Hostname changed. cPanel/WHM still try to access original hostname

Nathan D.

Well-Known Member
Mar 21, 2004
78
0
156
Virginia
When I first had my box set up, I of course set it up with a hostname. Once I configured the server how I like it, I decided to change my hostname. I changed it and verified the following files do contain the correct entries for the new hostname:

hosts file
Apache config
wwwacct.conf
resolv.conf
network config

Everything works fine except when in cPanel and WHM (mostly WHM) when clicking links, it still directs itself to the original hostname. http://originalhostname.domain.com. Where else could the original hostname be stored that cPanel/WHM uses for its links?

Thanks in advance,
 

cPanelNick

Administrator
Staff member
Mar 9, 2015
3,481
35
208
cPanel Access Level
DataCenter Provider
When I first had my box set up, I of course set it up with a hostname. Once I configured the server how I like it, I decided to change my hostname. I changed it and verified the following files do contain the correct entries for the new hostname:

hosts file
Apache config
wwwacct.conf
resolv.conf
network config

Everything works fine except when in cPanel and WHM (mostly WHM) when clicking links, it still directs itself to the original hostname. http://originalhostname.domain.com. Where else could the original hostname be stored that cPanel/WHM uses for its links?

Thanks in advance,
Try

/usr/local/cpanel/bin/checkallsslcerts
/usr/local/cpanel/startup
 

Nathan D.

Well-Known Member
Mar 21, 2004
78
0
156
Virginia
Try

/usr/local/cpanel/bin/checkallsslcerts
/usr/local/cpanel/startup
Alright. I ran both of those. checkallsslcrts confirms that the ssl certs are still for the original hostname and says warning due to those certs not matching the current hostname but it doesn't appear to resolve the issue, it just posts that there is a problem. I ran startup behind that and it restarted cpanel apparently.

The issue remains.
 

Nathan D.

Well-Known Member
Mar 21, 2004
78
0
156
Virginia
I changed the following setting in WHM to resolve my issue:

When visiting /cpanel or /whm or /webmail with SSL, you can choose to redirect to:
SSL Certificate Name Hostname Origin Domain Name

I selected hostname rather than SSL Cert name and it still goes through SSL but the links/URL reflect the current hostname.

Thanks!
 

calviin

Registered
Sep 23, 2009
1
0
51
Go to WHM -> Service Configuration -> Manage Service SSL Certificates

And reset all certificate.
That should do the trick.