How to install mod_security without loosing httpd.conf changes?

gotroot

Well-Known Member
Mar 27, 2007
50
0
156
Im really confused now. With running of easyapache3 today we have lost all our httpd.conf changes, now we are back to square one, all changes lost.

In the new httpd.conf it says that any changes made will be lost la di da!!

So how are we supposed to install 3rd party apps that make changes to httpd.conf during installation, eg mod security installs mod_sec.so plus a few other things? How are these preserved?

We also need to add some other things to httpd.conf. Where do we add them and what do we run to preserve them? And after that, how do we reedit what has already been preserved?

Im very confused.
 

Todd Mitchell

Well-Known Member
Staff member
Nov 13, 2006
301
1
243
Houston, TX
Any manual changes made to httpd.conf need to be distilled. We are using a new config system that will help in keeping a syntactically correct httpd.conf at all times.

Once you make any manual edits to httpd.conf. You will need to run '/usr/local/cpanel/bin/apache_conf_distiller --update --main' in order to update the templates with these changes. Once the changes have been distilled, they will be saved for later conf rebuilds.

ModSecurity can also be installed using EA3.
 

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,607
79
458
cPanel Access Level
Root Administrator
Im really confused now. With running of easyapache3 today we have lost all our httpd.conf changes, now we are back to square one, all changes lost.

In the new httpd.conf it says that any changes made will be lost la di da!!

So how are we supposed to install 3rd party apps that make changes to httpd.conf during installation, eg mod security installs mod_sec.so plus a few other things? How are these preserved?

We also need to add some other things to httpd.conf. Where do we add them and what do we run to preserve them? And after that, how do we reedit what has already been preserved?

Im very confused.
The method to saving your changes is documented in httpd.conf at the top of the file.
 

gotroot

Well-Known Member
Mar 27, 2007
50
0
156
Yes i understand that making changes to httpd.conf then running distiller saves them elsehwere but what happens if i want to remove those changes? Where do i remove them from? Also, i had to rebuild apahce via easyapache. Are my old changes still in place and if so where can i see them?
 

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,607
79
458
cPanel Access Level
Root Administrator
There are several ways to remove entries. First check the output of /usr/local/cpanel/bin/apache_conf_distiller --help for various flags.

If you wish to remove a Directive, simply remove it from httpd.conf and rerun apache_conf_distiller with --reset --update --main flags.

If you wish to start afresh, run apache_conf_distiller with --update --reset --defaults