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.

Limit the number of connections for Apache per Virtual Domain?

Discussion in 'EasyApache' started by mydomain, Jan 23, 2006.

  1. mydomain

    mydomain Well-Known Member

    Joined:
    Aug 10, 2003
    Messages:
    138
    Likes Received:
    0
    Trophy Points:
    16
    We have several servers, one particular server has an extremently popular site which at this time of year receives huge numbers of hits and this results in a huge number of concurrent connections and appears to be causing Apache to appear down for new connections after the maxclients limit is reached.

    Can you recommend what should be done in this case and whether the maxclients for that particular virtual host can be limited to a value so that other sites are not affected.

    Ive looked at mod_throttle but that would appear to be really for limiting bandwidth usage per virtual host for example, where Im looking to limit the maxclients/connections per virtual domain.

    Any help appreciated.
     
  2. anton_latvia

    anton_latvia Well-Known Member
    PartnerNOC

    Joined:
    May 11, 2004
    Messages:
    348
    Likes Received:
    3
    Trophy Points:
    18
    Location:
    Latvia
    cPanel Access Level:
    Root Administrator
    For apache 1.3 you can use mod_ipdrop. Here is how I install and configure it:

    Code:
    cd
    cd install
    mkdir ipdrop
    cd ipdrop
    wget http://miksir.pp.ru/mod_ipdrop_v001/Makefile
    wget http://miksir.pp.ru/mod_ipdrop_v001/mod_ipdrop.c
    APXS=/usr/local/apache/bin/apxs make
    APXS=/usr/local/apache/bin/apxs make install
    
    vi /etc/httpd/conf/httpd.conf
    
    
    /etc/init.d/httpd restart
    
    ##		 ##
    #  CONFIGURATION  #
    ##		 ##
    
    GlobalMaxConnectionsPerIP 10 10 10 
    IPDropDebug 1
     
Loading...

Share This Page