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.

Preserve amends to /etc/httpd/conf/httpd.conf ?

Discussion in 'General Discussion' started by robocrop, Aug 13, 2010.

  1. robocrop

    robocrop Member

    Joined:
    Mar 19, 2008
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    Is there a way to preserve amends we make to first (default) VirtualHost container in /etc/httpd/conf/httpd.conf?

    We have a custom setup for a site and we want all unmatched hostnames to be caught by that VirtualHost. As per Apache manual all unmatched hosts are processed by first VirtualHost directive, hence we copied DocumentRoot, suPHP user and some other values from out main site's VH.

    Running /usr/local/cpanel/bin/apache_conf_distiller --update and then /usr/local/cpanel/bin/build_apache_conf reverts our changes.
     
  2. robocrop

    robocrop Member

    Joined:
    Mar 19, 2008
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    edit httpd.conf through WHM using the following path in WHM.

    Service Configuration -> Apache Configuration -> Include Editor -> Pre VirtualHost Include -> All Versions -> pre_virtualhost_global.conf
    I added my Vhost details here, saved and restarted Apache and it worked perfectly.

    This will put the VH information even above the default virtual host so will act as the "catch all" account.
     

Share This Page