Getting realpath for a request

2016-07-14 Thread Chinoy Gupta
Hi, I am creating a nginx proxy handler to talk to a backend server. In that handler, I would like to get the physical path of the file to be served by a request. The file can be present in the docroot of nginx or any alias. How can I get this information? Regards, Chinoy

Re: limit_req_zone key cache lifetime

2016-07-14 Thread Chad Hansen
Great, thank you! On Thu, Jul 14, 2016 at 4:26 PM Maxim Dounin wrote: > Hello! > > On Thu, Jul 14, 2016 at 07:22:06PM +, Chad Hansen wrote: > > > I'm looking for documentation or explanation for how keys expire in the > > limit_req_zone. I have the basic documenations here: > > > > *A client

Re: limit_req_zone key cache lifetime

2016-07-14 Thread Maxim Dounin
Hello! On Thu, Jul 14, 2016 at 07:22:06PM +, Chad Hansen wrote: > I'm looking for documentation or explanation for how keys expire in the > limit_req_zone. I have the basic documenations here: > > *A client IP address serves as a key. Note that instead of $remote_addr, > the $binary_remote_a

limit_req_zone key cache lifetime

2016-07-14 Thread Chad Hansen
I'm looking for documentation or explanation for how keys expire in the limit_req_zone. I have the basic documenations here: *A client IP address serves as a key. Note that instead of $remote_addr, the $binary_remote_addr variable is used here. The $binary_remote_addr variable’s size is always 4 b

Re: ngx_http_upstream_process_non_buffered_request recv question

2016-07-14 Thread gaoyan09
thx I see it. This do keep sending to client if upstream connection eof or error, only finalize request when u->busy_bufs == NULL, as all recv buffers had send to client Posted at Nginx Forum: https://forum.nginx.org/read.php?2,268278,268288#msg-268288 _

Re: ngx_http_upstream_process_non_buffered_request recv question

2016-07-14 Thread Maxim Dounin
Hello! On Wed, Jul 13, 2016 at 11:09:47PM -0400, gaoyan09 wrote: > size = b->end - b->last; > > if (size && upstream->read->ready) { > > n = upstream->recv(upstream, b->last, size); > > if (n == NGX_AGAIN) { > break; > } > >