LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 893|回复: 3

Win系统apache线程设置问题......

[复制链接]
发表于 2004-2-23 12:59:41 | 显示全部楼层 |阅读模式
大家好,我想请教一下我的win系统的apache如何限制限程

软件:win2000 adv/apache 2.0.48/php 4.x

我在网上找到了mod_limitipconn.c模块的设置方法,但是无法成功,好像只对1.x支持的样子,或者只对linux支持。。。。。

请高手帮忙告诉我怎么限制线程。。。。。。

最好还能把流量限制方法告诉我,谢谢!!!!!
 楼主| 发表于 2004-2-23 13:56:43 | 显示全部楼层
怎么没人帮我啊。。。。。。

如果有懂得就详细点告诉我,或者加我QQ:315941,谢谢
发表于 2004-2-23 14:15:10 | 显示全部楼层
win apache port http://www.gknw.net/development/apache/httpd-2.0/win32/modules/mod_limitipconn-0.22-2.0.45-w32.zip



mod_limitipconn.c
David Jao <djao@dominia.org>

Apache 2.0 C module to limit the maximum number of simultaneous
connections per IP address. Allows inclusion and exclusion of files
based on MIME type.

Example configuration:

---------------------------------------------------------------------------

ExtendedStatus On

# Only needed if the module is compiled as a DSO
LoadModule limitipconn_module lib/apache/mod_limitipconn.so

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

---------------------------------------------------------------------------

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.

  Connections in excess of the limit result in a stock 503 Service
  Temporarily Unavailable response. The job of returning a more useful
  error message to the client is left as an exercise for the reader.

  mod_limitipconn sets the LIMITIP environment variable to 1 whenever a
  download is denied on the basis of too high an IP count. You can use
  this variable to distinguish accesses that have been denied by this
  module. For example, a line like

      CustomLog /var/log/httpd/access_log common env=!LIMITIP

  in httpd.conf can be used to suppress logging of denied connections
  from /var/log/httpd/access_log. (Note that, if you want to do this,
  you'll probably also want to comment out the ap_log lines from
  mod_limitipconn.c to suppress error_log lines as well.)

Proxy client tracking

  By default, all clients behind a proxy are treated as coming from the
  proxy server's IP address. If you patch Apache with the included
  apachesrc.diff patch and configure with --enable-forward and rebuild,
  the real IP addresses of clients behind proxies can be correctly
  detected in most situations. See the INSTALL file for specific
  instructions.
 楼主| 发表于 2004-2-23 16:03:52 | 显示全部楼层
楼上的谢谢啦。。。。。。。

大部分设置我都搞定了,apache也可以启动

但是一但开了ExtendedStatus就起不来了。。。。

也就是把ExtendedStatus On前面的#去掉了

高手求助!!!!!/
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表