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.

My manual changes was not conserver in httpd.conf

Discussion in 'EasyApache' started by postcd, Apr 21, 2014.

  1. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    620
    Likes Received:
    6
    Trophy Points:
    18
    I had an instruction to add some ifmodule directive into httpd.conf .

    But appears this change was not reflected after i did:

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

    and then

    /usr/local/cpanel/bin/build_apache_conf

    Please how the easiest way i can modiffy this httpd.conf from A) command line, B) WHM and keep changes 4ever?


    This is httpd.conf header:

     
    #1 postcd, Apr 21, 2014
    Last edited by a moderator: Apr 21, 2014
  2. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
  3. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    620
    Likes Received:
    6
    Trophy Points:
    18
    i read the docs, but im unsure where should i put my directive

    to be preserved. it is Mod evasive. I have default Apache WHM/cpanel server setup which i installed before one week, Optimised license
     
  4. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Do your manual changes need to go inside a VirtualHost container, or outside a VirtualHost container? That is the first thing you need to establish, and that is why I asked that question in my previous reply. If you are not sure if the changes need to be inside or outside a VirtualHost container, you should ask the developer of the software you are trying to install.

    Once you know whether they should go inside or outside a VirtualHost container, the documentation explains how to make custom changes for each scenario.
     
  5. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    620
    Likes Received:
    6
    Trophy Points:
    18
    Developer i think dont mention if virtual host or not virtual host. But i found:

    Q.

    A.
    That is really a matter of choice.
    I myself inserted it on a lot of servers just before the <Directory /> section
    in the main httpd.conf file at /usr/local/apache/bin and ran the update script

    Another quotation:
    does it make more sense where to add it? I want to use this module for all cpanel accounts. So in which file and where to add it please?
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    653
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  7. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    620
    Likes Received:
    6
    Trophy Points:
    18
    so on "Home »Server Status »Apache Status" i see "Server Version: Apache/2.2.27 (Unix)".

    so i assume i need to edit in apache2 directory ONLY?..


    but vhost.local and ssl:vhost.local is already existing and it contains alot of data. Im unsure where exactly i need to add my rule mentioned in third post of this topic?

    hope you can advice, help
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    653
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    You can use an include file. EX:

    Code:
    vi /usr/local/apache/conf/userdata/mod_evasive.conf
    Add the custom entry you referenced earlier to this file. Save the file, then run:

    Code:
    /scripts/verify_vhost_includes 
    Then, assuming it does not fail, rebuild the Apache configuration file via:

    Code:
    /scripts/rebuildhttpdconf
    This adds the entry to all Virtual Hosts, regardless of Apache version.

    Thank you.
     
Loading...

Share This Page