這個MODULE相當好用,這個可以用來解決架設APACHE頻寬問題 安裝方式:
For Linux: 先去下載軟體: mod_cband 目前釋出到 0.9.7.5版 下載到 /tmp/ 資料夾裡面 解壓縮: tar -zxvf mod-cband-0.9.7.5.tgz 如果你有安裝 apsx2的話 請用下面安裝 $ cd mod-cband-0.9.7.5 $ ./configure $ make $ make install 如果沒有安裝 apsx2的話 請用下面安裝 重新編譯 configure –add-module=../mod-cband/mod_cband.c –enable-shared=cband –enable-module=so 設定方法: * 修改httpd.conf 加上2行CBandScoreFlushPeriod 1 CBandRandomPulse On mkdir /var/www/scoreboard chown apache:apache /var/www/scoreboard * 設定 VirtualHost <VirtualHost 1.2.3.4> ServerName www.example.com ServerAdmin webmaster@example.com DocumentRoot /var/www CBandSpeed 1024 10 30 CBandRemoteSpeed 20kb/s 3 3 說明:# 100MB virtualhost bandwidth limit 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# Maximal 10kB/s speed, 3 requests/s and 2 open connections for any remote client CBandRemoteSpeed 10kb/s 3 2 4個禮拜清除設定一次# a period of time after which the scoreboard will be cleared (4 weeks) CBandPeriod 4W # define ‘class_1′ CBandClassDst 217.
[Read More]