LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   APACHE: limit max connections from the same IP ? (https://www.linuxquestions.org/questions/linux-networking-3/apache-limit-max-connections-from-the-same-ip-301889/)

tclwp 03-15-2005 10:46 AM

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 !!!

druuna 03-16-2005 03:51 AM

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.

tclwp 03-17-2005 01:00 AM

# ./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)

emphaze 06-24-2005 11:47 AM

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.