I'm using right the mod_evasive of Apache so I can reduce the probability of DOS. The problem that I had is that the application behind the reverse proxy(which is our server apache) is very weak and is developed so that one page loads 200 files (css,js and so on). So when I use a script like https://github.com/rohitchormale/hulk/blob/master/hulk.py, I succeed at killing the application because the script generates many unique URI for the attack and because I was obliged to allow more than 300 pages (* 10 possible clients having the same ip) per second.
So a solution that I have thought about is blacklisting an ip when it receives a x number of 404 error in one second. Is it possible to do that?