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.

How to install mod_security without loosing httpd.conf changes?

Discussion in 'Security' started by gotroot, Oct 2, 2007.

  1. gotroot

    gotroot Active Member

    Joined:
    Mar 27, 2007
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    6
    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.
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,450
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Search the forums for the word distiller. There are several threads you'll probably want to read completely.
     
  3. ToddShipway

    ToddShipway Well-Known Member

    Joined:
    Nov 13, 2006
    Messages:
    300
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    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.
     
  4. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    The method to saving your changes is documented in httpd.conf at the top of the file.
     
  5. gotroot

    gotroot Active Member

    Joined:
    Mar 27, 2007
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    6
    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?
     
  6. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    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
     
Loading...

Share This Page