Results 1 to 2 of 2

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

  1. #1
    Member
    Join Date
    Mar 2008
    Posts
    14

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

    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. #2
    Member
    Join Date
    Mar 2008
    Posts
    14

    Default

    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.

Similar Threads

  1. Faulty httpd.conf - can't rebuild with rebuildhttpd.conf
    By movielad in forum cPanel & WHM Discussions
    Replies: 4
    Last Post: 03-21-2011, 12:43 PM
  2. Preserve httpd.conf during recompile
    By kives in forum cPanel & WHM Discussions
    Replies: 1
    Last Post: 08-03-2009, 05:41 AM
  3. httpd.conf sites/www.domain.com.conf Wildcard DNS
    By ttremain in forum cPanel & WHM Discussions
    Replies: 6
    Last Post: 12-16-2008, 11:19 AM
  4. Daily httpd restart changes AllowOverride None to All in httpd.conf
    By Lasers in forum cPanel & WHM Discussions
    Replies: 7
    Last Post: 02-26-2007, 12:17 PM