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.

Invalid Hostname

Discussion in 'General Discussion' started by tsze, Aug 28, 2004.

  1. tsze

    tsze Registered

    Joined:
    Aug 25, 2004
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    Maybe i named a wrong hostname, then error message show:
    Invalid Hostname. (swede.mydomain.com ). Hostnames may not contains spaces or tabs.

    When i want to change another name there still show:
    Invalid Hostname. (swede.mydomain.com ). Hostnames may not contains spaces or tabs.

    How can i change it back?

    Any help would be great!!
     
  2. Setheronie12

    Setheronie12 Well-Known Member

    Joined:
    Feb 3, 2004
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    6
    Ok here is what you need to do..

    Login to your WHM under root

    http://domain.com:2086
    or use the Secure connection
    https://domain.com:2087

    once you have logged in under root look on the Left side. Under Server Setup and a few lines down is Change Host Name. Cick on that and edit the host name to what you want. Make sure you dont use spacses. Then click on Edit Setup, make sure that the Host Name is set to your new host name and not the other.


    Thanks
    Seth
     
  3. tsze

    tsze Registered

    Joined:
    Aug 25, 2004
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Thanks help!
    But when i click Change Host Name, there still said
    Invalid Hostname. (swede.mydomain.com ). Hostnames may not contains spaces or tabs.

    Its seems can't change back, whatever what i click WHM still said:
    Invalid Hostname. (swede.mydomain.com ). Hostnames may not contains spaces or tabs.

    Do i need to reinstall WHM?

    Thanks again!
     
  4. mhbrands

    mhbrands Member

    Joined:
    Apr 12, 2003
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Kansas
    try it this way:

    log in as root through ssh (using putty or other interface). Once there type in:

    pico -w /etc/hosts
    (change hostname)

    pico -w /etc/sysconfig/network
    (change hostname)

    hostname (type in hostname)

    Now reboot your server. When it comes back up, it will have reset your hostname.
     
  5. tsze

    tsze Registered

    Joined:
    Aug 25, 2004
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Thanks!

    Coz i just remote control my server, can i reboot by using SSH?
    If yes, could you tell me the command?

    Thanks again!
     
  6. mhbrands

    mhbrands Member

    Joined:
    Apr 12, 2003
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Kansas
    to reboot the server from the command line, type in:

    /sbin/shutdown -r now

    should fix it right up!
     
Loading...

Share This Page