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.

Change server hostname

Discussion in 'General Discussion' started by gersonfs, Nov 26, 2011.

  1. gersonfs

    gersonfs Active Member

    Joined:
    Sep 30, 2007
    Messages:
    34
    Likes Received:
    0
    Trophy Points:
    6
    Hi!

    After change hostname in whm and in /etc/sysconfig/network i change the hostname in /etc/httpd/conf/httpd.conf, but when run /usr/local/cpanel/bin/apache_conf_distiller --update, give info bellow:


    info [apache_conf_distiller] Missing IP for domain OLD_HOSTNAME, using XXX.XXX.XXX.XXX
    info [apache_conf_distiller] Missing port for domain OLD_HOSTNAME, using 80
    info [apache_conf_distiller] Missing user for domain OLD_HOSTNAME, using nobody
    info [apache_conf_distiller] Missing group for domain OLD_HOSTNAME, using nobody
    info [apache_conf_distiller] Missing ServerName for domain OLD_HOSTNAME, using OLD_HOSTNAME


    Why this? I change old_hostname to new_hostname, but apache_conf_distiller dont recognize this.

    Thanks!
     
  2. storminternet

    storminternet Well-Known Member

    Joined:
    Nov 2, 2011
    Messages:
    462
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Hi,

    Check /etc/hosts and /etc/wwwacct.conf to make sure that you have added new hostname there. Just to confirm new hostname is into effect type the hostname command on shell. If you are still seeing old hostname then make sure to set it with the hostname command as
    hostname server.newhostname.com
     
  3. gersonfs

    gersonfs Active Member

    Joined:
    Sep 30, 2007
    Messages:
    34
    Likes Received:
    0
    Trophy Points:
    6
    Hi!!

    hostname command on shell return the correct hostname. wwwacct.conf file "HOST" param is correct too!

    And now?

    Thanks!
     
  4. storminternet

    storminternet Well-Known Member

    Joined:
    Nov 2, 2011
    Messages:
    462
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    try apache update from the WHM and let us see what happens this time.
     
  5. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Check /var/cpanel/userdata/nobody for the old hostname being listed there. If it is, move the /var/cpanel/userdata/nobody/oldhostname file to root and then check /var/cpanel/userdata/nobody/main doesn't have the old hostname listed either. Again, if it does, copy that file and then edit it.

    After doing that, run the following commands to see if the message quits appearing:

    Code:
    cp /usr/local/apache/conf/httpd.conf /usr/local/apache/conf/httpd.conf.bak111127
    /scripts/rebuildhttpdconf
    /etc/init.d/httpd restart
     
  6. gersonfs

    gersonfs Active Member

    Joined:
    Sep 30, 2007
    Messages:
    34
    Likes Received:
    0
    Trophy Points:
    6
    Thanks! It Worked!
     
Loading...

Share This Page