apache-2.4.6 mod_bw-0.92 实现限速上传或下载

  1. 下载 mod_bw  wget http://ivn.cl/files/source/mod_bw-0.92.tgz
  2. 解压到mod_bw tar -zxvf mod_bw-0.92.tgz -C mod_bw  
  3. 编辑 mod_bw.c  替换remote_addr 为 client_addr     :%s/remote_addr/client_addr/    (修改原因是由于apache2.2 到2.4 api有所改变,详细如下:http://httpd.apache.org/docs/2.4/developer/new_api_2_4.html)
  4. 执行 apxs -i -c -a mod_bw.c
    • 如果没有apxs命令:
      查看你的httpd-devel套件包的全名 yum list httpd*
      安装httpd-devel   yum install httpd-devel.x86_64

  5. 最后修改配置文件并重启apache

配置另见 http://www.361way.com/apache-limit-speed/2138.html

 

posted @ 2019-04-17 16:57  一名保安  阅读(266)  评论(0)    收藏  举报