Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

pre_main_global.conf not working?

Discussion in 'General Discussion' started by OooLong, May 1, 2014.

  1. OooLong

    OooLong Well-Known Member

    Joined:
    Mar 16, 2011
    Messages:
    104
    Likes Received:
    0
    Trophy Points:
    66
    cPanel Access Level:
    Website Owner
    I just installed mpm_worker and added this to pre_main_global.conf:

    Code:
    <IfModule worker.c>
        ServerLimit          40
        StartServers          2
        MaxClients          1000
        MinSpareThreads      20
        MaxSpareThreads      50
        ThreadsPerChild      25
        MaxRequestsPerChild   0
    </IfModule>

    to test to see if this actually work I change the variable and restart Apache.

    Code:
    <IfModule worker.c>
        ServerLimit          1
        StartServers          1
        MaxClients          1
        MinSpareThreads      1
        MaxSpareThreads      1
        ThreadsPerChild      1
        MaxRequestsPerChild   1
    </IfModule>
    to my surprise my site still response as normal, I tested this on multiple browser and deleted all cache. Is my use of pre_main_global.conf correct? what should I change? thanks in advance.
     
  2. vanessa

    vanessa Well-Known Member
    PartnerNOC

    Joined:
    Sep 26, 2006
    Messages:
    834
    Likes Received:
    28
    Trophy Points:
    178
    Location:
    Virginia Beach, VA
    cPanel Access Level:
    DataCenter Provider
    You can easily test to see if this is working by looking at httpd.conf. These templates are used to generate a working Apache configuration, so they will not be actually applied unless you:

    1) Rebuild the conf (/scripts/rebuildhttpdconf)
    2) Restart Apache

    It's possible you didn't do #1. So try that, then check your httpd.conf file to make sure the correct settings are in place before testing again.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. OooLong

    OooLong Well-Known Member

    Joined:
    Mar 16, 2011
    Messages:
    104
    Likes Received:
    0
    Trophy Points:
    66
    cPanel Access Level:
    Website Owner
    I did both step 1 & 2 and this don't really have anything to do with httpd.conf as it concern pre_main_global.conf and the settings in it. Was it right for me to put those setting in pre_main_global.conf?
     
  4. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,726
    Likes Received:
    1,883
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Yes, it's acceptable to add those values to the "/usr/local/apache/conf/includes/pre_main_global.conf" file.

    Could you elaborate more on what change you are expecting to see? Is there a specific increase in page load or speed that you are expecting?

    Thanks.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice