| Subject: | Re: X-Accel-Redirect to proxy_pass | |
|---|---|---|
| From: | Igor Sysoev (is-G...@public.gmane.org) | |
| Date: | Aug 14, 2008 6:00:44 am | |
| List: | ru.sysoev.nginx | |
| Attachments: | ||
Refine Search
| From | Sent On | Attachments |
|---|---|---|
| Daniel | Aug 12, 2008 7:30 am | |
| Igor Sysoev | Aug 12, 2008 7:53 am | |
| Daniel | Aug 12, 2008 9:46 pm | |
| Igor Sysoev | Aug 12, 2008 11:50 pm | |
| Igor Sysoev | Aug 14, 2008 6:00 am | .xar |
| Subject: | Re: X-Accel-Redirect to proxy_pass | |
|---|---|---|
| From: | Igor Sysoev (is-G...@public.gmane.org) | |
| Date: | Aug 14, 2008 6:00:44 am | |
| List: | ru.sysoev.nginx | |
| Attachments: | ![]() patch.xar - 0.4k | |
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/
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; }

