Use mod_limitipconn.c to limit Apache's concurrent number
Linux Technology Starters 2002-12-12
Download MOD_LIMITIPCONN.C
TAR.GZ I386 RPM (Proxy Client Detection Feature Not Enabled) Source RPM
I am using the TAR package that is mod_limitipconn-0.04.tar.gz, (This module can already support Apache2) execute on the server
# wget http://dominia.org/djao/limit/mod_limitipconn-0.04.tar.gz Download to Local
Then perform the following command to compile the installation. My apache is located in / usr / local / apache directory
unzip:
[Root @ ns chenlf] # tar zxvf mod_limitipconn-0.04.tar.gz mod_limitipconn-0.04 / mod_limitipconn-0.04 / Makefilemod_limitipconn-0.04 / READMEmod_limitipconn-0.04 / apachesrc.diffmod_limitipconn-0.04 / mod_limitipconn.cmod_limitipconn-0.04 / ChangeLog
Compilation installation:
[Root @ ns chenlf] # cd mod_limitipconn-0.04 [root @ ns mod_limitipconn-0.04] # lsapachesrc.diff ChangeLog Makefile mod_limitipconn.c README [root @ ns mod_limitipconn-0.04] # / usr / local / apache / bin / apxs -c -i -a mod_limitipconn.c gcc -DLINUX = 22 -I / usr / include / db1 -fpic -DSHARED_MODULE -I / usr / local / apache / include -c mod_limitipconn.cgcc -shared -o mod_limitipconn.so mod_limitipconn.o [ activating module `limitipconn 'in /usr/local/apache/conf/httpd.conf]cp mod_limitipconn.so /usr/local/apache/libexec/mod_limitipconn.sochmod 755 /usr/local/apache/libexec/mod_limitipconn.socp / usr /LOCAL/apache/conf/httpd.conf /usr/local/apache/conf/httpd.conf.bakcp /usr/local/apache/conf/httpd.conf.new /usr/local/apache/conf/httpd.confrm /usr/local/apache/conf/httpd.conf.new
Modify the configuration file:
1 Global control:
Plus the following lines in httpd.conf:
3 In addition, the apache's extendedStatus must be set to ON. Find the # extendedStatus on the previous note in httpd.conf.
Ok, all the configuration end, you can take effect on apache.