WHM Inconsistency in Hostname WTF?

ckizer

Well-Known Member
Aug 12, 2001
127
0
316
Sorry about the WTF I just couldn't resist ;-)I need step-by-step instructions on how to change my hostname. I setup cpanel to use a .com domain for everything including DNS servers. However I'm going to switch it to the .net of the same domain.

Under WHM "Edit Setup" you can enter or change the hostname, however it says this:

"This is the current hostname of this server. (The value of this attribute can only be modified with the change hostname function)."

So I go to the "Change hostname" function but there is no option to change the hostname it just keeps reassigning it the same one. What gives? WHM doesn't allow me to change the hostname.

Sooo...

How can I change the hostname (and make the change everywhere so the system doesn't bork or DNS die)? And why is that feature still in WHM if it doesn't actually allow you to change anything?
 

ckizer

Well-Known Member
Aug 12, 2001
127
0
316
Is this error normal:

Bind reloading on server1 using rndc Error reloading bind on server1: rndc: connect failed: connection refused
Created DNS entry for server1.nfanatic.net
Add Complete
 

kris1351

Well-Known Member
Apr 18, 2003
961
0
166
Lewisville, Tx
Make sure it is in /etc/hosts, don't delete the localhost reference. Then in /etc/sysconfig/network. If you would do a search I know I have answered this a couple of times before.
 

ckizer

Well-Known Member
Aug 12, 2001
127
0
316
i guess my question is why is there an option to change the host in whm manager that doesn't change the host? I change the host in those two files and now when i reboot apache and exim and a few other servers aren't working..

Where are all the places to change the DNS and the hostname? It still is sees the .com NS servers somewhere instead of the .net i changed too.

If this question comes up often it just goes to show that obviously this IS a problem and WHM should either remove this feature or fix it to allow me one simple way to chnage the host in all locations!
 

ckizer

Well-Known Member
Aug 12, 2001
127
0
316
etc/hosts

/etc/hosts says this:

67.19.59.186 server1.nfanatic.net server1 nfanatic.net.servermatrix.com nfanatic
127.0.0.1 localhost

Is this correct? the machine name is supposed to be server1.nfanatic.net
 

chirpy

Well-Known Member
Verifed Vendor
Jun 15, 2002
13,437
33
473
Go on, have a guess
If this question comes up often it just goes to show that obviously this IS a problem and WHM should either remove this feature or fix it to allow me one simple way to chnage the host in all locations!
did you log a support ticket with them? If you don't, they cannot fix it for your situation.

I've used the WHM change hostname feature on just about every server I've worked on on a number of different platforms and it has always worked flawlessly.
 

kennyp

Registered
May 29, 2003
4
0
151
I would not say flawlessly

I run many cpanel servers, have used the change hostname feature MANY times and it NEVER has worked flawlesslly.

It will change your hostname but you will also have to login shell as root and change manually in many places as it does not remove these values.

/etc/hosts
/etc/sysconfig/networrk
/etc/httpd/conf/httpd.conf
/etc/named.conf

In the latter two you will probably have to modify old server name setting to new one and May have to modify the db files referred to in those settings.


Thanks

Ken Poirier
ByteWorks Web Services
The Internet Company that could
 
C

cPanelBilly

Guest
after you change the hostname please run /scripts/upcp --force
 

baidarkabob

Well-Known Member
Jan 12, 2003
105
0
166
Alaska
safe?

kennyp said:
I run many cpanel servers, have used the change hostname feature MANY times and it NEVER has worked flawlesslly.

It will change your hostname but you will also have to login shell as root and change manually in many places as it does not remove these values.

/etc/hosts
/etc/sysconfig/networrk
/etc/httpd/conf/httpd.conf
/etc/named.conf

In the latter two you will probably have to modify old server name setting to new one and May have to modify the db files referred to in those settings.


Thanks

Ken Poirier
ByteWorks Web Services
The Internet Company that could
Is it safe to do a find and replace for the new hostname in the above mentioned files?

Bob