Custom headers with X-Accel-Redirect.

W. Andrew Loe III andrew at
Fri Jan 9 23:45:37 MSK 2009

Does anyone have this patch working with 0.6.34?

I modified it a bit to get it to cleanly apply
(, now nginx builds but all
X-Accel-Redirects cease to function. I thought it could be S3
rejecting my requests so I put my log into debug. But I never get a
response from nginx. I double checked by dumping my interface with
Wireshark, but the request is never sent to S3 and nginx never replies
to my client.

>From my nginx.conf (unchanged):

location /AWSS3/ {

My backend application responds with (this is an open test file you
can feel free to hit):

HTTP/1.1 200 OK
Connection: close
Date: Fri, 09 Jan 2009 20:39:31 GMT
Status: 200 OK
X-Runtime: 0.00758
Etag: "7215ee9c7d9dc229d2921a40e899ec5f"
Cache-Control: private, max-age=0, must-revalidate
Content-Disposition: attachment; filename=lightweight-web-services-large.mp4
Server: Mongrel 1.1.5
Content-Type: video/mp4; charset=utf-8
Content-Length: 1


On Tue, Nov 18, 2008 at 12:42 PM, mike <mike503 at> wrote:
> +1
> On Tue, Nov 18, 2008 at 12:37 PM, Thomas Witt <thomas.witt at> wrote:
>> Eden Li <eden at ...> writes:
>>> The patch below seems to work in my trivial testing.  For example:
>> This seems actually to work, thanks a lot! But I'd rather love to see this
>> implemented in nginx directly rather than having to patch every release.
>> Can we make any progress here? Igor, what's your opinion about this patch? Any
>> chance to make it in a offical release of nginx?

More information about the nginx mailing list