ckevin
01-24-2002, 07:42 AM
My Apache installed with mod_throttle support. However, how can I restrict the bandwidth usage by directories and not by virtual server? (Just like geocities.com, their homepage account bandwidth usage would not larger than 500MB monthly)
Thanks,
Kevin
allan
01-24-2002, 09:59 AM
Yes, you can use mod_throttle to limit bandwidth by directory:
http://www.snert.com/Software/mod_throttle/#ThrottlePolicy
ckevin
01-24-2002, 10:44 AM
<IfModule mod_throttle.c>
ThrottlePolicy none
<Location /throttle-status>
SetHandler throttle-status
</Location>
<Location /throttle-me>
SetHandler throttle-me
</Location>
<Location /*/throttle-me>
SetHandler throttle-me
</Location>
<Directory /home/DOMAIN/www/*>
SetHandler throttle-me
ThrottlePolicy volume 750M 30d
AllowOverride FileInfo AuthConfig Limit
Options MultiViews ExecCGI Indexes Includes FollowSymLinks
<Limit GET POST OPTIONS PROPFIND>
Order allow,deny
Allow from all
</Limit>
<LimitExcept GET POST OPTIONS PROPFIND>
Order deny,allow
Deny from all
</LimitExcept>
</Directory>
</IfModule>
I config it as above in httpd.conf.
Actually, I want every dir. under /www/ can only have 750MB data transfer monthly, but the output is just measure all the data transfer under /www/. Do I have anything wrong?
Thanks,
Kevin
Skeptical
01-24-2002, 11:21 AM
I'm very interested in this as well.