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.

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:
    66
    Likes Received:
    0
    Trophy Points:
    6
    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 ! :)
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,448
    Likes Received:
    194
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Try adding those here instead:

    WHM >> Service Configuration >> Apache Configuration >> Global Configuration :)
     
  3. SecondSight

    SecondSight Well-Known Member

    Joined:
    Jun 30, 2004
    Messages:
    66
    Likes Received:
    0
    Trophy Points:
    6
    Hello ! :)

    I can't do it in Global configuration because you don't find all the settings there. :)
     
  4. garrettp

    garrettp Well-Known Member
    PartnerNOC

    Joined:
    Jun 18, 2004
    Messages:
    312
    Likes Received:
    0
    Trophy Points:
    16
    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.
     
  5. SecondSight

    SecondSight Well-Known Member

    Joined:
    Jun 30, 2004
    Messages:
    66
    Likes Received:
    0
    Trophy Points:
    6
    Hello ! :)

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

    Thank you ! :)
     
  6. garrettp

    garrettp Well-Known Member
    PartnerNOC

    Joined:
    Jun 18, 2004
    Messages:
    312
    Likes Received:
    0
    Trophy Points:
    16
    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_.
     
  7. praystone

    praystone Registered

    Joined:
    Jun 29, 2009
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    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