Apache conf Distiller - Where are changes stored?

bumfilter

Registered
Aug 5, 2003
3
0
151
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
 
Last edited:

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
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
 

bumfilter

Registered
Aug 5, 2003
3
0
151
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!