阿帕奇 - 如何限制文件的最大下载速度? (如果不是Apache时,可以运行lighthttpd) [英] Apache - how to limit maximum download speed of files? (if not apache, i can run lighthttpd)
问题描述
我有一大堆的影片,但我只想要限制最大下载速度,这些文件是为1Mbps。我怎样才能(在Apache的理想,但lighthttpd是一个选项)设置此
I have a bunch of videos but I only want to limit the maximum download speed for these files to be 1mbps. How can I set this up (ideally in Apache but lighthttpd is an option)
感谢
推荐答案
如果你只是想限制每个连接的下载速度,无需为管理总计或进行更细粒度的控制任何方面,最好的办法来处理这是使用Apache自己的 mod_ratelimit
。
If you only want to limit the download speed per connection, without any regard for managing the totals or performing more fine-grained controls, the best way to handle this is to use Apache's own mod_ratelimit
.
这个例子限制在文件
的一切/到为1Mbit / s的
...
This example restricts everything under /files
to 1Mbit/s
...
<Location /files>
SetOutputFilter RATE_LIMIT
SetEnv rate-limit 1000
</Location>
我已经研究并尝试其他的方法和模块,在这种特殊情况下,mod_ratelimit是倒手做最简单的方法。
I've researched and tried other methods and modules, and in this specific case, mod_ratelimit is hands down the easiest way to do this.
这篇关于阿帕奇 - 如何限制文件的最大下载速度? (如果不是Apache时,可以运行lighthttpd)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!