The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WHM Inconsistency in Hostname WTF?

Discussion in 'General Discussion' started by ckizer, Aug 27, 2004.

  1. ckizer

    ckizer Well-Known Member

    Joined:
    Aug 12, 2001
    Messages:
    129
    Likes Received:
    0
    Trophy Points:
    16
    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?
     
  2. ckizer

    ckizer Well-Known Member

    Joined:
    Aug 12, 2001
    Messages:
    129
    Likes Received:
    0
    Trophy Points:
    16
    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
     
  3. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Once you change the hostname you have to reboot the server.
     
  4. ckizer

    ckizer Well-Known Member

    Joined:
    Aug 12, 2001
    Messages:
    129
    Likes Received:
    0
    Trophy Points:
    16
    change the hostname where? I can't change the hostname!
     
  5. kris1351

    kris1351 Well-Known Member

    Joined:
    Apr 18, 2003
    Messages:
    963
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    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.
     
  6. ckizer

    ckizer Well-Known Member

    Joined:
    Aug 12, 2001
    Messages:
    129
    Likes Received:
    0
    Trophy Points:
    16
    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!
     
  7. ckizer

    ckizer Well-Known Member

    Joined:
    Aug 12, 2001
    Messages:
    129
    Likes Received:
    0
    Trophy Points:
    16
    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
     
  8. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    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.
     
  9. kennyp

    kennyp Registered

    Joined:
    May 29, 2003
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    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
     
  10. cPanelBilly

    cPanelBilly Guest

    after you change the hostname please run /scripts/upcp --force
     
  11. baidarkabob

    baidarkabob Well-Known Member

    Joined:
    Jan 12, 2003
    Messages:
    105
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Alaska
    safe?

    Is it safe to do a find and replace for the new hostname in the above mentioned files?

    Bob
     
Loading...

Share This Page