Lets say I subdomain called largefiles.domain.com This is on a dedicated server and I can change any configuration. Server runs Apache/2.2.3 (CentOS)

How do i restrict all file downloads to just 10Kbps for every file downloaded from the webserver? What is the easiest solution to implement this for the entire subdomain?

link|improve this question

64% accept rate
feedback

2 Answers

up vote 3 down vote accepted

I would go for mod_bw:

Example: Limit every user to a max of 10Kb/s on a vhost :

<Virtualhost *>
  BandwidthModule On
  ForceBandWidthModule On
  Bandwidth all 10240
  MinBandwidth all -1
  Servername www.example.com
</Virtualhost>
link|improve this answer
The documentation says: ForceBandWidthModule [On|Off] By default, the mod wont catch every request. If you enable it, every request will be processed by the mod. – Denilson Sá Feb 24 '10 at 19:18
feedback

mod_cband should fix this for you.

See this nice tutorial: http://www.howtoforge.com/mod_cband_apache2_bandwidth_quota_throttling

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.