Welcome! Log In Create A New Profile

Advanced

Re: limit_req is not working in virutal location?

Maxim Dounin
January 11, 2018 10:58AM
Hello!

On Thu, Jan 11, 2018 at 10:47:29AM -0500, pva wrote:

> Francis, thank you for you answer.
>
> > On Thu, Jan 11, 2018 at 03:32:07AM -0500, pva wrote:
> > I'm slightly guessing, so apologies if I mislead you and hopefully
> > someone else will correct this if necessary...
> >
> > > Hi. Could you, please, explain why limit_req in @limitspeed location
> > > is not working in case of redirect to @allowed virtual location and
> works
> > > in case I copy @allowed virtual location contents inside @limitspeed?
> >
> > I think that "return" happens before, and therefore effectively
> > overrides "limit_req".
>
> This is my guess as well. But then I'm wondering if this limit will be
> applied in case try_files redirects to @localdvr?
>
> try_files /live$uri @localdvr;

That's because try_files is not a mechanism to "conditionally select
configurations"[1] like the rewrite module directives (including
"return"), but rather a way to choose which file will be used for
request processing. As such, try_files checks happen right before
actually returning the response, after various access checks and
limits.

[1] http://nginx.org/en/docs/http/ngx_http_rewrite_module.html

--
Maxim Dounin
http://mdounin.ru/
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

limit_req is not working in virutal location?

pva January 11, 2018 03:32AM

Re: limit_req is not working in virutal location?

Francis Daly January 11, 2018 08:14AM

Re: limit_req is not working in virutal location?

pva January 11, 2018 10:47AM

Re: limit_req is not working in virutal location?

Maxim Dounin January 11, 2018 10:58AM

Re: limit_req is not working in virutal location?

pva January 11, 2018 12:22PM

Re: limit_req is not working in virutal location?

Maxim Dounin January 11, 2018 01:16PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 302
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready