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.

custom event-mpm settings using pre_main_global.conf

Discussion in 'Workarounds and Optimization' started by morrow95, Oct 9, 2015.

  1. morrow95

    morrow95 Well-Known Member

    Joined:
    Oct 8, 2006
    Messages:
    83
    Likes Received:
    0
    Trophy Points:
    6
    I am using the event mpm and need to change some settings. I have found this is not possible using home >> service configuration >> apache configuration >> global configuration. Why? Well, one scenario is :

    ServerLimit 20
    MaxRequestWorkers 500

    If you enter these values in whm will complain about the maxclients value (server limit). So, you can add these in the pre_main_global.conf by using home >> service configuration >> apache configuration >> include editor.

    In the include I have added :

    <IfModule event.c>
    StartServers 5
    ServerLimit 20
    MaxRequestWorkers 500
    MaxConnectionsPerChild 20000
    MinSpareThreads 75
    MaxSpareThreads 250
    ThreadsPerChild 25
    ThreadLimit 64
    KeepAlive On
    KeepAliveTimeout 2
    MaxKeepAliveRequests 100
    </IfModule>

    most of which are defaults. Here is my question... are these values actually being used!? If you look in the /usr/local/apache/conf/httpd.conf file there are already defaults listed in the file such as :

    # These can be set in WHM under 'Apache Global Configuration'
    Timeout 300
    TraceEnable Off
    ServerSignature Off
    ServerTokens ProductOnly
    FileETag None
    StartServers 5
    <IfModule prefork.c>
    MinSpareServers 5
    MaxSpareServers 10
    </IfModule>
    <IfModule itk.c>
    MinSpareServers 5
    MaxSpareServers 10
    </IfModule>
    ServerLimit 20
    MaxRequestWorkers 250
    MaxConnectionsPerChild 20000
    KeepAlive On
    KeepAliveTimeout 2
    MaxKeepAliveRequests 100

    well, the custom values I set in the include file are included at the top of this file (pre) so since these values come after that include in httpd.conf aren't they being overwritten?
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    652
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Please let us know if this document is helpful:

    Apache - Global Configuration

    In particular, the section titled "How to manually edit Apache features" explains how to edit the values you see in the "Global Configuration" interface.

    Thank you.
     
Loading...

Share This Page