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.

Everytime rebuild httpdconf, a sub domain missing.

Discussion in 'General Discussion' started by sodapopinski, Dec 30, 2011.

  1. sodapopinski

    sodapopinski Well-Known Member

    Joined:
    Aug 13, 2001
    Messages:
    79
    Likes Received:
    0
    Trophy Points:
    6
    In one server, there's an account let's say abc.com and it's sub domain let's say http://subdomain.abc.com
    Everytime I restore other account (some new client want their files restored automatically) which is mean cpanel run rebuild httpdconf script, the http://subdomain.abc.com config always missing from httpd.conf, I should add it manually.

    Any idea why it happened and how to fix it permanently?

    Thanks alot in advance.
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,474
    Likes Received:
    202
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    When you manually edit httpd.conf you must distill it afterward. At the very top of your httpd.conf should be instructions on how to accomplish that. Are you doing that?
     
  3. 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
    Even distilling httpd.conf will not allow VirtualHost entries to be kept in that file. This is because the VirtualHost sections are built from /var/cpanel/userdata location. VirtualHost entries cannot be manually added to /usr/local/apache/conf/httpd.conf file. When you do add them manually, they won't be maintained on httpd.conf rebuilds. This is why the following appears above each of the VirtualHost entries:

    The distiller is only intended to be used for entries that build the /var/cpanel/conf/apache/main file. The VirtualHost sections are not in that file. Entries such as MaxClients and ServerAliasMatch are in that file.

    To correct the subdomain entry missing, it would either need to be added in /var/cpanel/userdata/username/sub.domain.com and /var/cpanel/userdata/username/main files, or added via an include in either /usr/local/apache/conf/includes/post_virtualhost_global.conf location or /usr/local/apache/conf/userdata/std/2/username location. Please note that username is the cPanel username, while sub.domain.com is the subdomain's name for all instances of those mentioned.
     
Loading...

Share This Page