# Proxy\_read\_timeout for an apache location?

**URL:** <https://www.ruby-forum.com/t/proxy-read-timeout-for-an-apache-location/227239>\
**Category:** NGINX\
**Created:** [March 8, 2013, 8:31am UTC](https://www.ruby-forum.com/t/proxy-read-timeout-for-an-apache-location/227239 "2013-03-08T08:31:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [March 8, 2013, 8:31am UTC](https://www.ruby-forum.com/t/proxy-read-timeout-for-an-apache-location/227239/1 "2013-03-08T08:31:11Z")

</div>

Can I set proxy\_read\_timeout for only a particular location which is  
passed to apache?

- Grant

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [March 8, 2013, 11:53am UTC](https://www.ruby-forum.com/t/proxy-read-timeout-for-an-apache-location/227239/2 "2013-03-08T11:53:55Z")

</div>

> Can I set proxy\_read\_timeout for only a particular location which is  
> passed to apache?

> **[GitHub - nginxinc/nginx-wiki: ARCHIVED -- Source for the now archived NGINX Wiki...](https://github.com/nginxinc/nginx-wiki)**
>
> ARCHIVED -- Source for the now archived NGINX Wiki section of https://www.nginx.com

Posted at Nginx Forum:  
[http://forum.nginx.org/read.php?2,237111,237116#msg-237116](http://forum.nginx.org/read.php?2,237111,237116#msg-237116)

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [March 8, 2013, 6:50pm UTC](https://www.ruby-forum.com/t/proxy-read-timeout-for-an-apache-location/227239/3 "2013-03-08T18:50:31Z")

</div>

> > Can I set proxy\_read\_timeout for only a particular location which is  
> > passed to apache?
> 
> [GitHub - nginxinc/nginx-wiki: ARCHIVED -- Source for the now archived NGINX Wiki section of https://www.nginx.com · GitHub](http://wiki.nginx.org/HttpProxyModule#proxy_read_timeout)

This config causes nginx to serve the request instead of apache:

location /for-apache.html {  
proxy\_read\_timeout 30m;  
}

Can I pass for-apache.html to apache and wait 30m for it?

- Grant

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [March 10, 2013, 4:54am UTC](https://www.ruby-forum.com/t/proxy-read-timeout-for-an-apache-location/227239/4 "2013-03-10T04:54:38Z")

</div>

> > Can I pass for-apache.html to apache and wait 30m for it?
> 
> In nginx, one request is handled in one location. Only the configuration  
> in, or inherited into, that location applies.
> 
> To send to apache, you need the proxy\_pass directive – which has  
> documentation at [Module ngx\_http\_proxy\_module](http://nginx.org/r/proxy_pass)
> 
> So the answer is “yes you can, but you have to configure it”.

Got it, thank you.

location /for-apache.html {  
proxy\_read\_timeout 30m;  
proxy\_pass [http://127.0.0.1:8080](http://127.0.0.1:8080);  
}

- Grant

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [March 8, 2013, 9:31pm UTC](https://www.ruby-forum.com/t/proxy-read-timeout-for-an-apache-location/227239/5 "2013-03-08T21:31:12Z")

</div>

On Fri, Mar 08, 2013 at 09:49:39AM -0800, Grant wrote:

Hi there,

> > > Can I set proxy\_read\_timeout for only a particular location which is  
> > > passed to apache?
> > 
> > [GitHub - nginxinc/nginx-wiki: ARCHIVED -- Source for the now archived NGINX Wiki section of https://www.nginx.com · GitHub](http://wiki.nginx.org/HttpProxyModule#proxy_read_timeout)

That’s a good resource.

[Module ngx\_http\_proxy\_module](http://nginx.org/r/proxy_read_timeout) redirects to the official  
documentation for the directive, and if it says “context: location”,  
then it can apply to a particular location.

> This config causes nginx to serve the request instead of apache:
> 
> location /for-apache.html {  
> proxy\_read\_timeout 30m;  
> }
> 
> Can I pass for-apache.html to apache and wait 30m for it?

In nginx, one request is handled in one location. Only the configuration  
in, or inherited into, that location applies.

To send to apache, you need the proxy\_pass directive – which has  
documentation at [Module ngx\_http\_proxy\_module](http://nginx.org/r/proxy_pass)

So the answer is “yes you can, but you have to configure it”.

## f

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