Welcome! Log In Create A New Profile

Advanced

Re: limit_req - feature request?

June 20, 2010 01:03PM
> но ведь limit_req для .php можно
> прописать
> внутри блока location ~ \.php$ { ... }
> ?

Да? Я почему-то думал, что location ~ это то же самое, что if и я не понимал зачем это надо. А limit_req внутри if не работает.

> location ~ \.php$ {
> limit_req zone=one burst=3 nodelay;
> proxy_pass ...;
> }

Вот вопросительный знак в теме письма подразумевал эту конфигурацию... и еще одну. Почему у меня не хватило ума их сразу описать? Надо на другом форуме спросить.

А если я так напишу:
limit_req_zone 0$binary_remote_addr zone=req0:10m rate=1r/s;
limit_req_zone 1$binary_remote_addr zone=req1:10m rate=100r/s;

server {
location / {
$var=0;
if ($uri =~/\.php/) {
$var=1;
}
limit_req zone=req$var;
}
}

Что, это тоже сработает? Там у меня с if и указанием переменных перловый синтаксис, я не помню как в nginx, главно, что смысл понятен.

PS. Спасибо...
PPS. Еще не проверял. Проверю - видимо напишу.
Subject Author Posted

limit_req - feature request?

vgoncharov June 18, 2010 10:06AM

Re: limit_req - feature request?

Sergej Kandyla June 18, 2010 10:48AM

Re: limit_req - feature request?

vgoncharov June 18, 2010 11:32AM

Re: limit_req - feature request?

Sergej Kandyla June 18, 2010 12:04PM

Re: limit_req - feature request?

vgoncharov June 18, 2010 01:30PM

Re: limit_req - feature request?

Igor Sysoev June 18, 2010 12:14PM

Re: limit_req - feature request?

vgoncharov June 18, 2010 01:07PM

Re: limit_req - feature request?

Igor Sysoev June 18, 2010 03:58PM

Re: limit_req - feature request?

Konstantin Svist June 18, 2010 04:32PM

Re: limit_req - feature request?

vgoncharov June 19, 2010 02:17AM

Re: limit_req - feature request?

Igor Sysoev June 19, 2010 03:14AM

Re: limit_req - feature request?

vgoncharov June 19, 2010 04:55AM

Re: limit_req - feature request?

Gena Makhomed June 19, 2010 08:00AM

Re: limit_req - feature request?

vgoncharov June 19, 2010 04:36PM

Re: limit_req - feature request?

Gena Makhomed June 19, 2010 07:42PM

Re: limit_req - feature request?

vgoncharov June 20, 2010 01:03PM

Re: limit_req - feature request?

vgoncharov June 21, 2010 03:38PM

Re: limit_req - feature request?

paranoidchaos June 20, 2010 02:59AM

Re: limit_req - feature request?

Anton Bessonov June 20, 2010 07:18AM

Re: limit_req - feature request?

paranoidchaos June 21, 2010 04:12AM

Re: limit_req - feature request?

Anton Bessonov June 21, 2010 08:40AM

Re: limit_req - feature request?

paranoidchaos June 21, 2010 09:30AM

Re: limit_req - feature request?

Anton Bessonov June 21, 2010 09:54AM

Re: limit_req - feature request?

paranoidchaos June 21, 2010 10:02AM

Re: limit_req - feature request?

Anton Bessonov June 21, 2010 10:26AM

Re: limit_req - feature request?

paranoidchaos June 21, 2010 03:22PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 118
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready