|
Posted by J.O. Aho on 02/01/07 06:26
Nu wrote:
> I want to protect myself from if someone with a fast connection hammers my
> site. It's not denial of service attacks, but offline downloaders (of course
> that don't show they're offline downloaders in the useragent so I can't
> filter them by that). My main issue is my site is PHP so if they hammer it,
> it gets all the PHP files executing and overwhelms the CPU. I'd like to be
> able to after a certain amount of hits on my index.php per second, so just
> refuse.
I wouldn't worry about that, you would need a really badly written php
scripts, of course if your "server" runs a load of unnecessary things like a
GUI, WoW, access and so on, then the machine spends a lot of CPU cycles to
things it shouldn't, so turn off those things that aren't supposed to run on
the server.
> I can't find how to do that. Can it be done in PHP, htaccess, etc.
You need the mod_cband, you find it at http://cband.linux.pl/
It allows you limit the speed from your site.
You can use smoothwall, there are extensions that bans a ip for a while if it
does hammer the server, but of course requires a real OS instead of that you
seems to use.
--
//Aho
[Back to original message]
|