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 Include or Post VirtualHost Include ?

Discussion in 'General Discussion' started by SecondSight, Jun 12, 2010.

  1. SecondSight

    SecondSight Well-Known Member

    Joined:
    Jun 30, 2004
    Messages:
    70
    Likes Received:
    0
    Trophy Points:
    156
    Hello ! :)

    I need to make modifications to httpd.conf. So, I write the changes in the Post VirtualHost Include :

    ServerLimit 500
    MaxClients 500
    MaxRequestsPerChild 20000
    MaxKeepAliveRequests 50
    KeepAliveTimeout 1
    MinSpareServers 5
    MaxSpareServers 15

    But when I read topics in this forum, I see people write changes in Pre Main Include ?

    Which one should I choose then if :
    - I don't want to modify httpd.conf
    - and I want the changes to be kept when there is an update.

    Thank you ! :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,309
    Likes Received:
    393
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Try adding those here instead:

    WHM >> Service Configuration >> Apache Configuration >> Global Configuration :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. SecondSight

    SecondSight Well-Known Member

    Joined:
    Jun 30, 2004
    Messages:
    70
    Likes Received:
    0
    Trophy Points:
    156
    Hello ! :)

    I can't do it in Global configuration because you don't find all the settings there. :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. garrettp

    garrettp Well-Known Member
    PartnerNOC

    Joined:
    Jun 18, 2004
    Messages:
    312
    Likes Received:
    0
    Trophy Points:
    166
    cPanel Access Level:
    DataCenter Provider
    I'd suggest using the Global Configuration screen in the WHM mentioned by Infopro first to set all of the settings you need, as most of what you listed is available there. Then for the few others that aren't, I would drop them in the /usr/local/apache/conf/includes/pre_virtualhost_global.conf include. If you use pre_main, they'll be overwritten by the values cPanel defines in the main httpd.conf.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. SecondSight

    SecondSight Well-Known Member

    Joined:
    Jun 30, 2004
    Messages:
    70
    Likes Received:
    0
    Trophy Points:
    156
    Hello ! :)

    Ok. But then, why not use Post VirtualHost Include ?

    Thank you ! :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. garrettp

    garrettp Well-Known Member
    PartnerNOC

    Joined:
    Jun 18, 2004
    Messages:
    312
    Likes Received:
    0
    Trophy Points:
    166
    cPanel Access Level:
    DataCenter Provider
    I suppose there's no reason to *not* use it, just that you're not overwriting any virtualhost settings so there isn't an actual need to use the post_ instead of pre_.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. praystone

    praystone Registered

    Joined:
    Jun 29, 2009
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    51
    What about drop these settings in the /usr/local/apache/conf/includes/pre_virtualhost_global.conf include.

    <IfModule prefork.c>
    ServerLimit 10000
    StartServers 16
    MinSpareServers 16
    MaxSpareServers 64
    MaxClients 10000
    MaxRequestsPerChild 0
    </IfModule>

    Does It Work?
     
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