APACHE: limit max connections from the same IP ?
hellow everybody
I've compliled the mod_limitipconn.c into httpd kernel(static), #httpd -l has list mod_limitipconn.c out and # vi /var/www/conf/httpd.conf <IfModule mod_limitipconn.c> <Location /> MaxConnPerIP 3 </Location> </IfModule> # httpd -S syntax ok but after I started newly compiled httpd and # netstat -ant|grep my-server-ip:80 I still found a lot of connections from same IP(s). Is there something I have to do to make the mod_limitipconn.c work ? Thanks a ton !!! |
Hi,
You don't mention mod_status, maybe that is the problem: Notes: This module will not function unless mod_status is loaded and the "ExtendedStatus On" directive is set. The limits defined by mod_limitipconn.c apply to all IP addresses connecting to your Apache server. Currently there is no way to set different limits for different IP addresses. Hope this helps. |
# ./httpd -l
Compiled in modules: core.c mod_access.c mod_auth.c mod_include.c mod_log_config.c mod_env.c mod_setenvif.c prefork.c http_core.c mod_mime.c mod_limitipconn.c mod_status.c mod_autoindex.c mod_asis.c mod_cgi.c mod_negotiation.c mod_dir.c mod_imap.c mod_actions.c mod_userdir.c mod_alias.c mod_so.c Look, mod_status.c was compiled into httpd and ExtendedStatus was set to on already(apache version 2.0.53) |
put it into commonhttpd.conf not in httpd.conf to get it work.
|
All times are GMT -5. The time now is 08:00 AM. |