Limit_zone in nginx

Hi,

Can I limit particular IP or Domain using limit_zone?
Can anybody give me an example.

Do Good wrote:

Hi,

Can I limit particular IP or Domain using limit_zone in nginx?
Can anybody give me an example.

sure:

limit_zone one $binary_remote_addr 10m;
limit_conn one 7;

you need put this in http section.

Andrius Semionovas wrote:

sure:

limit_zone one $binary_remote_addr 10m;
limit_conn one 7;

you need put this in http section.

Can you explain this ¨one¨ ¨10¨ ¨7¨in detail like

Hello!

On Thu, Feb 12, 2009 at 09:35:39AM +0100, Do Good wrote:

Andrius Semionovas wrote:

sure:

limit_zone one $binary_remote_addr 10m;
limit_conn one 7;

you need put this in http section.

Can you explain this ¨one¨ ¨10¨ ¨7¨in detail like

http://wiki.codemongers.com/NginxHttpLimitZoneModule

Maxim D.

“one” is zone name.

limit_zone one $binary_remote_addr 10m;

i create limit_zone named “one”. limit_zone check by
$binary_remote_addr.
what is 10m, i not know

limit_conn one 7;

This say limit_zone named “one”, accept only 7 connections at moment.