nginx limit_conn_zone questions

To limit the number of requests per IP (in case of a DOS) you can use the limitconnzone directive.

HTTP

limit_conn_zone $binary_remote_addr zone=myzone:10m;

SERVER

limit_conn myzone 10;

I understand this example, but when you have multiple virtual hosts, should you define a zone for each (or at least each important) virtual host/site?

limit_conn_zone $binary_remote_addr zone=myzone1:10m;
limit_conn_zone $binary_remote_addr zone=myzone2:10m;
limit_conn_zone $binary_remote_addr zone=myzone3:10m;

What size and number of connections did you set?

When and how do you use limitconnzone and limitreqzone together?

Thanx.

0 Replies

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct