最近发现有一个IP开了几十个线程在访问我们的服务器(好像用了webzip的软件),弄得服务器好慢,想限制却不知怎么做,请高手指点。
| 挡泥板 回复于:2003-10-15 14:50:09 |
| 我的apache是1.3.26的 |
| zhangweibo 回复于:2003-10-15 17:58:26 |
| 如果你没有安装相应的限制模块的话
把MaxRequestsPerChild 0的0改成10或者50试一下,我也不知道效果如何 可以限制一下存取的网页数 |
| 挡泥板 回复于:2003-10-16 08:10:31 |
| [quote:f19bcadd93="zhangweibo"]如果你没有安装相应的限制模块的话
把MaxRequestsPerChild 0的0改成10或者50试一下,我也不知道效果如何 可以限制一下存取的网页数[/quote:f19bcadd93] 如果安装相应的模块该怎么做呢? :roll: |
| 挡泥板 回复于:2003-10-17 11:14:11 |
| up |
| bend 回复于:2003-10-17 11:42:17 |
| 用IPtables的扩展功能,可以实现对每个IP的同时数量,不过要编kernel,在apache下.....不知道了 |
| HonestQiao 回复于:2003-10-17 11:50:57 |
| limitipconn_module |
| lightwiter 回复于:2003-10-17 20:37:57 |
| 有一个模块可以做这个事吧,不过不需要就没有去打听 |
| 挡泥板 回复于:2003-10-20 14:11:50 |
| [quote:aca428c54b="HonestQiao"]limitipconn_module[/quote:aca428c54b]
请斑竹指条明路啊 |
| 挡泥板 回复于:2003-10-22 10:54:32 |
| up |
| seacaptain 回复于:2003-10-22 13:14:03 |
| apxs -c mod_limitipconn.c -o mod_limitipconn.so
cp mod_limitipconn.so /www/apache/libexec/ 修改httpd.conf文件 ExtendedStatus On #注意必须成功加载了mod_status模块 # Only needed if the module is compiled as a DSO LoadModule limitipconn_module lib/apache/mod_limitipconn.so AddModule mod_limitipconn.c <IfModule mod_limitipconn.c> <Location /somewhere> MaxConnPerIP 3 # exempting images from the connection limit is often a good # idea if your web page has lots of inline images, since these # pages often generate a flurry of concurrent image requests NoIPLimit image/* </Location> <Location /mp3> MaxConnPerIP 1 # In this case, all MIME types other than audio/mpeg and video* # are exempt from the limit check OnlyIPLimit audio/mpeg video </Location> </IfModule> |
| jackylau 回复于:2004-04-15 13:29:31 |
| [quote:c726318d83="zhangweibo"]如果你没有安装相应的限制模块的话
把MaxRequestsPerChild 0的0改成10或者50试一下,我也不知道效果如何 可以限制一下存取的网页数[/quote:c726318d83] 这个好像不行呀? |