# Limit\_req off?

**URL:** <https://www.ruby-forum.com/t/limit-req-off/243865>\
**Category:** NGINX\
**Created:** [January 19, 2016, 11:02pm UTC](https://www.ruby-forum.com/t/limit-req-off/243865 "2016-01-19T23:02:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rafa\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/958977/32.png) [@Rafa\_F](https://www.ruby-forum.com/u/Rafa_F)\
**Post date:** [January 19, 2016, 11:02pm UTC](https://www.ruby-forum.com/t/limit-req-off/243865/1 "2016-01-19T23:02:05Z")

</div>

I have a location with limit\_req and would like to set up an inner path  
without the limit but with other settings same, e.g.

location / {  
limit\_req …;  
proxy\_pass …;  
location /private/ {  
limit\_req off;  
}  
}

How come “limit\_req off” is not an available option?  
Any other easy way of achieving this?

Thanks

Posted at Nginx Forum:

> **[limit\_req off?](https://forum.nginx.org/read.php?2,263998,263998#msg-263998)**
>
> I have a location with limit\_req and would like to set up an inner path without the limit but with other settings same, e.g. location / { limit\_req ...; proxy\_pass ...; location /private/ { limit\_req off; } } How co

---

<div class="post-metadata">

**Author:** ![Fry-kun](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/7cd45c/32.png) [@Fry-kun](https://www.ruby-forum.com/u/Fry-kun)\
**Post date:** [January 20, 2016, 3:53am UTC](https://www.ruby-forum.com/t/limit-req-off/243865/2 "2016-01-20T03:53:01Z")

</div>

You might wish to set up locations like that:

location /outer-path {  
limit\_req …  
}

## location /outer-path/inner-path { … }

_B. R._

On Tue, Jan 19, 2016 at 11:01 PM, Fry-kun [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![Fry-kun](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/7cd45c/32.png) [@Fry-kun](https://www.ruby-forum.com/u/Fry-kun)\
**Post date:** [January 22, 2016, 9:50pm UTC](https://www.ruby-forum.com/t/limit-req-off/243865/3 "2016-01-22T21:50:19Z")

</div>

Sure, except there are a few dozen identical config lines in these  
locations… If “limit\_req off” was an option, that would be the only  
difference.

## B.R. Wrote:

> _B. R._
> 
> > limit\_req …;
> 
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [mailman.nginx.org archive](http://mailman.nginx.org/mailman/listinfo/nginx)

Posted at Nginx Forum:  
[https://forum.nginx.org/read.php?2,263998,264025#msg-264025](https://forum.nginx.org/read.php?2,263998,264025#msg-264025)

---

<div class="post-metadata">

**Author:** ![Fry-kun](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/7cd45c/32.png) [@Fry-kun](https://www.ruby-forum.com/u/Fry-kun)\
**Post date:** [January 23, 2016, 12:23pm UTC](https://www.ruby-forum.com/t/limit-req-off/243865/4 "2016-01-23T12:23:40Z")

</div>

On Wed, Jan 20, 2016 at 02:14:16PM -0500, Fry-kun wrote:

Hi there,

> Sure, except there are a few dozen identical config lines in these  
> locations… If “limit\_req off” was an option, that would be the only  
> difference.

The usual reason why an option is not there, is that no-one has written  
it yet.

(Sometimes, the idea of the option has been explicitly rejected. I do  
not know the history of this one.)

However, one possible immediate workaround, untested by me, might be to  
define another limit\_req\_zone with a key variable that you do not set  
anywhere. (Call it “zone=off”, for example.)

Then in your nested location, use

limit\_req zone=off;

and that should stop the outer value from being inherited.

Good luck with it,

## f

Francis D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
