[snert.com...]
Looks like it might be useful for misbehavors....anybody know how to implement it?
With a little bit of experimenting and lots of Apache restarts I have figured out the basics for mod_throttle
Add the following to httpd.conf and restart Apache
<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>
</IfModule>
To confirm mod_throttle is working view through a web browser
[domain.com...]
ThrottlePolicy Speed 5G 4w
added to a virtual host directive will limit that virtual host to 5G of data over a four week period.
ThrottlePolicy Volume 5G 4w
will deny all requests after 5G has been reached over a four week period.
After adding ThrottlePolicy to virtual hosts restart Apache again.
[vhost.com...]
displays the throttle status of vhost.com
[domain.com...]
should now dislpay the status for each virtual host with a ThrottlePolicy
Note the following:
When Apache is restarted the values are all reset to zero.
The following in httpd.conf appears to allow virtual hosts to view the throttle status of other virtual hosts.
<Location /throttle-status>
SetHandler throttle-status
</Location>
I commented it out and added it to my main domain only.
-----------------------------------
At present I don't have time to test the following
You can throttle users by username or UID and a list of users can be throttled using absolute paths to files containing a list of usernames.
ThrottleUser username 200M 4w
will throttle individual users
ThrottleUser /etc/passwd 500M 4w
should throttle all users to 500M each over a four week period.
It also appears that you can create files with a list of users and throttle them by using
ThrottleUser /usr/throttle 100M 4w
should throttle users listed in a file named throttle in /usr directory