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.

server hostname

Discussion in 'General Discussion' started by Sheldon, Jun 16, 2004.

  1. Sheldon

    Sheldon Well-Known Member

    Joined:
    Jun 7, 2004
    Messages:
    378
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Canada
    ok.. I changed my server hostname via the whm server "change hostname" now I had 50 million problems with this.. 1. it never stuck after reboots etc. 2. I had problem with the dns and crap for it.

    so anyhow I finally get it working and such.

    but now I notice that the old hostname is still resident somewhere on the server....as when I look at bandmin and other places I still see it in the place where my new hostname should be?

    any suggestions?
     
  2. zentity

    zentity Well-Known Member

    Joined:
    Jun 16, 2004
    Messages:
    78
    Likes Received:
    0
    Trophy Points:
    6
    Login as root to your server:

    # hostname new.hostname.com

    Edit the following files

    /etc/sysconfig/network

    /etc/hosts

    Enter your new hostname in each.

    Then replace the old hostname within httpd.conf

    /usr/bin/replace 'old.hostname.com' 'new.hostname.com' -- /usr/local/apache/conf/httpd.conf

    Restart apache and exim - Make sure dns resolves and that any PTR records as necessary have been added for the new hostname :)

    That should do it.
     
  3. Sheldon

    Sheldon Well-Known Member

    Joined:
    Jun 7, 2004
    Messages:
    378
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Canada
    whats a PTR record?

    and btw thanks... looks like it worked so far
     
  4. zentity

    zentity Well-Known Member

    Joined:
    Jun 16, 2004
    Messages:
    78
    Likes Received:
    0
    Trophy Points:
    6
    PTR is a reverse dns record, you should have one for the mail server IP (usually your main IP)

    See what yours is by

    # host 123.123.123.123

    (Replace 123.123.123.123 with your main IP)

    You should see

    # host 123.123.123.123
    123.123.123.in-addr.arpa domain name pointer your.hostname.com.

    If you see

    # host 123.123.123.123
    Host 123.123.123.in-addr.arpa not found: 3(NXDOMAIN)

    Then ask your datacenter or provider to create a reverse dns record for your hostname :)

    Hope this helps.
     
    #4 zentity, Jun 16, 2004
    Last edited: Jun 16, 2004
  5. Sheldon

    Sheldon Well-Known Member

    Joined:
    Jun 7, 2004
    Messages:
    378
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Canada
    Host xx.xx.xx.66.in-addr.arpa not found: 2(SERVFAIL)

    :eek: wuts that mean?
     
  6. zentity

    zentity Well-Known Member

    Joined:
    Jun 16, 2004
    Messages:
    78
    Likes Received:
    0
    Trophy Points:
    6
    Thats not good either - It looks like a provider error with regards the PTR record - Let them have the output of that command and ask them to add a reverse dns record (PTR) for your new hostname with your main IP - You will then have no trouble sending mail to mail servers that require reverse dns (AOL for one) :)
     
  7. Sheldon

    Sheldon Well-Known Member

    Joined:
    Jun 7, 2004
    Messages:
    378
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Canada
    ticket sent off

    most apreciated..

    thanks
     
  8. zentity

    zentity Well-Known Member

    Joined:
    Jun 16, 2004
    Messages:
    78
    Likes Received:
    0
    Trophy Points:
    6
    Not a problem. :)
     
  9. Sheldon

    Sheldon Well-Known Member

    Joined:
    Jun 7, 2004
    Messages:
    378
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Canada
    erm hey..

    now none of my domains except my primary domain without the www is working..

    is it because the dc doesnt have reverse dns setup?
     
Loading...

Share This Page