X-Accel-Redirect to proxy_pass
Igor Sysoev
is at rambler-co.ru
Thu Aug 14 17:01:07 MSD 2008
On Wed, Aug 13, 2008 at 10:51:07AM +0400, Igor Sysoev wrote:
> On Wed, Aug 13, 2008 at 01:46:33PM +0900, Daniel wrote:
>
> > First I want to thank you for nginx is superb, and for your time to respond.
> > I debug the proxy server and looks like the request after the
> > redirection didn't change!?.
> > Any hints?.
>
> This is nginx feature: if you set proxy_pass without URI part, then
> it will use original URI.
>
> Workaround is to add URI part:
>
> location /store/ {
> internal;
> - proxy_pass http://filestore;
> + proxy_pass http://filestore/store/;
> }
The attached patch fix the bug.
--
Igor Sysoev
http://sysoev.ru/en/
-------------- next part --------------
Index: src/http/ngx_http_upstream.c
===================================================================
--- src/http/ngx_http_upstream.c (revision 1499)
+++ src/http/ngx_http_upstream.c (working copy)
@@ -1300,6 +1300,8 @@
r->method = NGX_HTTP_GET;
}
+ r->valid_unparsed_uri = 0;
+
ngx_http_internal_redirect(r, uri, &args);
return;
}
More information about the nginx
mailing list