block dos attack nginx behind cloudflare and loadbalancer

Andrey Belov defan at
Wed Mar 28 09:42:58 UTC 2012


On Mar 28, 2012, at 13:15 , ilmetu wrote:

> hi, this is my configuration :
>    # Create a global request accounting pool to prevent DOS
>     limit_zone staging $binary_remote_addr 5m;
>     limit_conn staging 5;

You're trying to limit a number of connections using limit_conn module.
The thing is that a lot of requests may proceed through a single connection.

If you want to set a maximum allowed requests rate, you should use
limit_req module instead:

Best regards,

More information about the nginx mailing list