Incorrect REQUEST_URI for nginx internal redirects and subrequests

53 views
Skip to first unread message

W. Andrew Loe III

unread,
Dec 8, 2009, 3:04:50 AM12/8/09
to phusion-...@googlegroups.com
If I create an action that X-Accel-Redirects to an internal url that
proxies to Passenger, the REQUEST_URI copied in to the scgi request is
the original not the new request, creating an infinite loop.

GET /archive
=> Rails response to mod_zip with list of files to zip
[/files/1, /files/2]
subrequest GET /files/1
subrequest GET /files/2

Both of these subrequest hit Passenger, but the REQUEST_URI is set to
/archive not /files/x.

Sometimes I need to X-Accel-Redirect/Subrequest to another rails
location, other times its a file on my filesystem, other times its
remote.

W. Andrew Loe III

unread,
Dec 9, 2009, 1:15:22 PM12/9/09
to Phusion Passenger Discussions
Reply all
Reply to author
Forward
0 new messages