Apache - how to limit maximum download speed of files? (if not apache, i can run lighthttpd)

后端 未结 2 523
醉酒成梦
醉酒成梦 2021-01-13 03:13

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 optio

2条回答
  •  天命终不由人
    2021-01-13 03:23

    You can try mod_bandwidth or more advanced mod_cband.

    Quote from mad_bandwidth site:

    Mod_bandwidth is a module for the Apache webserver that enable the setting of server-wide or per connection bandwidth limits, based on the directory, size of files and remote IP/domain.

    Quote from mod_cband site:

    mod_cband is an Apache 2 module provided to solve the problem of limiting users’ and virtualhosts’ bandwidth usage. The current versions can set virtualhosts’ and users’ bandwidth quotas, maximal download speed (like in mod_bandwidth), requests-per-second speed and the maximal number of simultanous IP connections (like in mod_limitipconn)

    Here is tutorial about how to use cband to limit download speed.

提交回复
热议问题