« Nanaimo Bar | Main | What not to do with SQL »

mod_throttle

Installed mod_throttle today.

The installation instructions are pretty easy to follow.. they don't mention editing the makefile to specify locations of apxs and apachectl if it's no in your path.. but that's pretty self-explanatory anyway.. Should never try to compile something without at least reading the makefile.

I know I'm probably just being paranoid, but it annoys me to see someone use wget on my entire site and suck up all my bandwidth for 30 minutes to download all my files. It has to make connecting for others miserable. I don't even want to think of what nefarious reasons anyone could have to want a copy of my site. (Read? Like anyone reads this..).

So far it's just the basic config that produces the stats (the url isn't a correct one for this site, but it gives you an idea of how this works). No throttling yet.. but soon to follow as I come up with a policy that makes sense and isn't a burden on regular users.


<IfModule mod_throttle.c>
   ThrottlePolicy none
   <Location /throttle-status>
      SetHandler throttle-status
   </Location>
</IfModule>

Comments

Hi UG :)

I am a relative newbie to the world of Linux and am adding the mod_throttle as a dso to my apache 1.3.27 server and I am having difficulty finding the address for my site for the statistics..

I am using the .so lib but otherwise I am using the defaults, (restarted apachectl after setting up a policy in httpd.conf with no errors) when I go to www.mysite.com/server-status I get nada.

How do I get the Web Page for the statistics? Must I use the .c files?

Great site by the way :)

Dear Jeff & UG:

http://yourserver.ext/throttle-status
This is what you are looking for - server-status is something else entirely

Here's a bit more useful config:
# SQUEEZE 'EM .............

ThrottleContentType text/html
ThrottleIndicator green 50
ThrottleIndicator yellow 75
ThrottleIndicator red 90
ThrottleRefresh 10
ThrottleMaxDelay 60
ThrottlePolicy Request 250K 1

SetHandler throttle-status


SetHandler throttle-me


SetHandler throttle-me

Feel free to season to taste - It means >250K of Requests in 1 second CHOP!
BTW, here's another goodie:
# DOs Evasive Module - Tracks scripts and Dos based attackes, hashes a db of the
# buggers, and locks them out.

DOSHashTableSize 196613
DOSPageCount 2
DOSSiteCount 5
DOSPageInterval 1
DOSSiteInterval 1
DOSBlockingPeriod 10

Cheers,

Joe Redcrow