[geeks] Traffic shaping w/Apache?

Bill Bradford mrbill at mrbill.net
Tue Apr 16 15:51:59 CDT 2002


On Tue, Apr 16, 2002 at 04:27:49PM -0400, Kurt Huhn wrote:
> > Nope, it Just Works once I quit trying to do it per-directory.
> > Wanted to do it whole-site now anyways, since I'm adding media
> > files (like the ss10 product intro).
> Nice!  So it limits each connection to <x> kbps (or bps/whatever)?  Does
> it limit based on origin IP or connection?

You can; although I dont.  

BandWidth

Syntax  : BandWidth <domain|ip|all> <rate>
Default : none
Context : per directory, .htaccess

Limit the bandwidth for files in this directory and
    sub-directories based on the remote host <domain> or
    <ip> address or for <all> remote hosts.
   
Ip addresses may now be specified in the network/mask format.
    (Ie: 192.168.0.0/21 )
   
The <rate> is in Bytes/second.
    A <rate> of "0" means no bandwidth limit.
   
Several BandWidth limits can be set for the same
    directory to set different limits for different
    hosts. In this case, the order of the "BandWidth"
    keywords is important as the module will take the
    first entry which matches the client address.

Example :

<Directory /home/www>
BandWidth ecp.fr 0
BandWidth 138.195 0
BandWidth all 1024
</Directory>

This will limit the bandwith for directory /home/www and 
      all it's subdirectories to 1024Bytes/sec, except for 
      .ecp.fr or 138.195..where no limit is set.

Bill

-- 
Bill Bradford
mrbill at mrbill.net
Austin, TX



More information about the geeks mailing list