Vixual / 122 posts / tags / 62 comments / feed / comments feed /
Search:

Apache 1.3.x 限制頻寬(mod_bandwidth)

僅限 Apache 1.3.x 使用 mod_bandwidth 來限制用戶流量。

安裝步驟

  1. 安裝 mod_bandwidth 模組,並建立相關目錄:
    apt-get install mod_bandwidth
    mkdir /tmp/apachebw
    mkdir /tmp/apachebw/link
    mkdir /tmp/apachebw/master
    chmod -R 777 /tmp/apachebw
  2. 編輯 /ect/httpd/conf/httpd.conf,檢查是否有
    <IfDefine HAVE_BANDWIDTH>
    LoadModule bandwidth_module   modules/mod_bandwidth.so
    </IfDefine>

    <IfDefine HAVE_BANDWIDTH>
    AddModule mod_bandwidth.c
    </IfDefine>

    沒有的話請自行加入。

  3. 在 AddModule 的區段之後再加上:
    BandWidthModule on
    BandWidth 192.168.1 0 #內網(192.168.1.*)不限流量
    BandWidth all 10240 #其它網路限流 10KB/s
  4. 儲存 httpd.conf 之後,重新啟動 Apache 即可。

參考網頁

收藏至網路書籤: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • Google
  • Live
  • YahooMyWeb
  • MyShare
  • Hemidemi
  • Funp

您可能會對以下這些文章感興趣

您對這篇文章的評價:
1 Star2 Stars3 Stars4 Stars5 Stars (請給予評價)
Loading ... Loading ...

沒有任何留言

發表您的評論

(您的留言會在審核後才能公開)