SSH into your box and do the following:
CODE
mkdir /temp
cd /temp
wget http://www.snert.com/Software/mod_throttle/mod_throttle312.tgz
tar zxvf mod_throttle312.tgz
cd mod_throttle-3.1.2
pico Makefile
cd /temp
wget http://www.snert.com/Software/mod_throttle/mod_throttle312.tgz
tar zxvf mod_throttle312.tgz
cd mod_throttle-3.1.2
pico Makefile
Change the line that reads:
CODE
APXS=apxs
To read:
CODE
APXS=/usr/local/apache/bin/apxs
Then continue:
CODE
make
make install
service httpd restart
make install
service httpd restart
Then go to your WHM and verify that it lists mod_throttle as an installed module.
Usage
Best bet is to go to http://www.snert.com/Software/mod_throttle/ and read up on all the options, but I will give you an example of limiting a site, and how to monitor all your throttled sites status.
Edit your /etc/httpd/conf/httpd.conf and locate the virtualhost entry for the site you wish to throttle. Just [bold]before[/bold] the:
CODE
</virtualhost>
Line, insert the following:
CODE
<IfModule mod_throttle.c>
ThrottlePolicy Volume 10G 30d
</IfModule>
<Location /throttle-me>
SetHandler throttle-me
</Location>
ThrottlePolicy Volume 10G 30d
</IfModule>
<Location /throttle-me>
SetHandler throttle-me
</Location>
The ThrottlePolicy line is the key. The first number is the amount of data and acceptable letters are G, M and K. The second number is the period and acceptable letters are m, w, d, h, and s.
Then restart Apache (service httpd restart) Now you can go to
CODE
http://throttleddomain.com/throttle-me
And see the status of the throttle.
If you want to be able to see the status of all throttled sites on the server at once, go to the first virtualhost entry in your httpd.conf file and add the following:
CODE
<Location /throttle-status>
SetHandler throttle-status
</Location>
SetHandler throttle-status
</Location>
Then restart Apache again, and you can go to http://host.name.com/throttle-status and see the status of all throttled sites.
Enjoy!