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.

Apache conf Distiller - Where are changes stored?

Discussion in 'EasyApache' started by bumfilter, Dec 7, 2011.

  1. bumfilter

    bumfilter Registered

    Joined:
    Aug 5, 2003
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Hi there,

    I modified httpd.conf to comment out some lines, then ran:

    /usr/local/cpanel/bin/apache_conf_distiller --update

    then

    /usr/local/cpanel/bin/build_apache_conf

    Instead of remaining commented out, it seems the lines were removed. Does the distiller tool store this change in a file somewhere? I'm assuming if I can reset that file, rebuilding again will bring them back. Maybe the tool doesn't work like that and they are gone forever, I'm not sure.

    Thanks if you can help

    Edit: FYI I commented out script aliases and would like to restore them
     
    #1 bumfilter, Dec 7, 2011
    Last edited: Dec 7, 2011
  2. 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
    Did you make a backup of httpd.conf prior to making these changes? If not, you really need to always make a backup of httpd.conf prior to making any edits. Backups for all files prior to editing is pretty important.

    As for the location, normally the ScriptAlias lines are in /var/cpanel/templates/apache2 location in the main.default file. If you commented them out, they might not be read from that file and might instead be pulled from /var/cpanel/conf/apache/main file. I would suggest copying all files to /root before you do anything more to ensure you have copies:

    Code:
    cp /usr/local/apache/conf/httpd.conf /root/httpd.conf.bak111207
    cp /var/cpanel/templates/apache2/main.default /root/main.default.bak111207
    cp /var/cpanel/conf/apache/main /root/main.bak111207
    If there is a /var/cpanel/conf/apache/local file, copy that file as well:

    Code:
    cp /var/cpanel/conf/apache/local /root/local.bak111207
    After that, you might try moving the /var/cpanel/conf/apache/main file entirely elsewhere such as /var/cpanel/conf/apache/main.bak, then re-running the distill and rebuild command to see the results:

    Code:
    /usr/local/cpanel/bin/apache_conf_distiller --update
    /scripts/rebuildhttpdconf
     
  3. bumfilter

    bumfilter Registered

    Joined:
    Aug 5, 2003
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Thanks cPanelTristan, that did the trick.

    I did keep a backup but it appeared that it was re-building it with the old httpd.conf instead. Fixed now though!
     
Loading...

Share This Page