You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Flash Wilson <fl...@gorge.org> on 2002/08/07 11:43:36 UTC

mod_throttle syntax

Hi,

Trying to use mod_throttle, to stop people mining our DB
via a CGI we have - basically ppl are leaving scripts running
and we spot it as the web boxen head towards the max number
of httpds.... this way we can throttle before it happens.
(Blocking them is not an option, unfortunately.)

So... installed mod_throttle as a DSO (blindingly simple, nice :)
and put in the default config, checked the throttle-status
page, all looks good. Now trying to get the config appropriate
to my needs...

I put this in my httpd.conf:
 
<IfModule mod_throttle.c>
        ThrottlePolicy idle
        ThrottleClientIP 10 idle 0 0
        ThrottleMaxDelay 1

        <Location /throttle-status>
        SetHandler throttle-status
        </Location>

        <Location /throttle-me>
        SetHandler throttle-me
        </Location>

        <Location /~*/throttle-me>
        SetHandler throttle-me
        </Location>
</IfModule>

Now, I have noticed a few odd things.

Firstly, throttle-status page is showing as "The page cannot
be displayed" although it is trying to reload itself periodically.

Second, when I configured as a DSO (simply "make install" :)
the DSO was put in /usr/local/apache/libexec, and a LoadModule
appeared in httpd.conf, however an AddModule mod_throttle.c
also appeared. I assume I don't want it because I have done this
as a DSO not static, and also because apache wont restart with it
in there, so I took it out. But the bit in my config starts
<IfModule mod_throttle.c> and made me wonder if Ive missed the
point completely.

I'm also not sure if Ive done a sensible thing with ThrottleClientIP,
Im trying to say "keep a record of the last ten users, and if they 
put requests through at more than one a second, either delay them
or if you need to, drop them on the floor. Just dont eat up all
my httpds!"

Anyone who has used mod_throttle able to throw some clue my
way? I've obeyed directions on http://www.snert.com/Software/mod_throttle
to install, and Im *trying* to follow that page for the config 
explanations too ;)

Cheers,
Flash

-- 
Flash Wilson      	       Restaurant, music and gig reviews,
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-  Tube station tour, Sponsor child, 
Visit The Gorge...	       Images of London, festivals & cars
http://www.gorge.org           and everything about Flash Wilson!

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org