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;如果有就说明已弄好了;
配置这里我只是简单配了一下,够用就行了:
现在网速都快了,另外在开发时,环境都在本地,很难模拟网速慢的用户。特别前端看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 #限制速度-----------------------+ BandwidthModule On ForceBandWidthModule On Bandwidth all 2024 MinBandwidth all -1 Servername fenlei.zishu.cn #限制速度配置结束---------------+ DocumentRoot D:/wamp/zishu/ <Directory D:/wamp/zishu/> ............................
评论:1 条 | 查看:19508 次