I'm having a similar problem. This is a fresh install of WHM/Cpanel. I set the hostname, during the setup wizard, to server2.domain.com. Now when I try to log into whm by going to server2.domain.com:2087 I get redirected to localhost.localdomain:2087, which of course give a browser 'page not found' error. This is my 2nd whm/cpanel based server and I never had this problem with server.domain.com.