文章目录

Apache带宽限制利用cband模块,模块配置内如下:

CBandLimit 100M
CBandSpeed 1024 10 30
CBandRemoteSpeed 10kb/s 3 2
CBandPeriod 4W
SetHandler cband-status
SetHandler cband-status-me

说明:

CBandLimit 100M

总带宽:

  • Maximal 1024kbps speed for this virtualhost
  • Maximal 10 requests per second for this virtualhost
  • Maximal 30 open connections for this virtualhost

CBandSpeed 1024 10 30

  • 限制此虚拟主机最高访问速度1024kbps
  • 限制此虚拟主机每秒最高接受请求数10个
  • 限制此虚拟主机最高并发连接30个

Maximal 10kB/s speed, 3 requests/s and 2 open connections for any remote client

CBandRemoteSpeed 10kb/s 3 2

限制来自远端访问速度10kB每秒,3个请求每秒,2个连接。
a period of time after which the scoreboard will be cleared (4 weeks)

CBandPeriod 4W

设定多久对所记录的全局访问带宽进行重设(清零)。
4W=4 weeks 4周(一个月)
Then you can access the status page with a URL Like

SetHandler cband-status

开启了mod_cband的实时监测功能,可以通过http://server_name/cband-status进行直观的观测。(全局监测)
Then you can access the status page with a URL like

SetHandler cband-status-me

开启了mod_cband的实时监测功能,可以通过http://server_name/cband-status-me进行直观的观测。(单一监测)

文章目录