您现在的位置 » 博客首页 » 后端代码

Apache中用BandWidth模块限速

2009-02-12
记录给自已!

现在网速都快了,另外在开发时,环境都在本地,很难模拟网速慢的用户。特别前端看javascript和CSS文件在慢速加载时的情况,更是麻烦。

从网上找了Apache的一个模块,可以限速,非常不错。

http://www.ivn.cl/apache/ 下载下来;

Windows 下的安装:
1. 将 mod_bw.dll 放到安装 apache 资料夹下的 modules目录下;
2. 编辑 httpd.conf,将 LoadModule bw_module modules/mod_bw.dll 加入;
3. 重开 apache;
4. 查看 phpinfo() 里是否有 mod_bw;如果有就说明已弄好了;

配置这里我只是简单配了一下,够用就行了:

<VirtualHost *:80>
  ServerName zishu.cn
  ServerAlias *.zishu.cn
  
  #限制速度-----------------------+
  Ban&#100;widthModule On
  ForceBan&#100;WidthModule On
  Ban&#100;width all 2024
  MinBan&#100;width all -1
  Servername fenlei.zishu.cn
  #限制速度配置结束---------------+
 
  DocumentRoot D:/wamp/zishu/
  <Directory D:/wamp/zishu/>
  ............................
评论:1 条 | 查看:19508 次
Mr.W于2009年02月18日8点00分00秒说
原Mr.W's Blog域名 Mr-W.Cn停止使用
新域名为Mr-W.Net
请及时更换友链链接,并奔走相告~

Mr.W's Blog
Mr-W.Net

发布评论/留言

名字/昵称:
内容: