Help with X-Accel-Redirect and "rewrite or internal redirection cycle" errors

Maxim Dounin mdounin at
Mon Jun 6 18:07:28 MSD 2011


On Mon, Jun 06, 2011 at 01:50:42PM +0100, Iain Barnett wrote:

> I'm trying to use X-Accel-Redirect from a Ruby app to hand over 
> downloading of a file to Nginx, but it fails and the error in 
> the logs is: 
> 2011/06/03 09:18:16 [error] 20500#0: *37 rewrite or internal redirection cycle while internal redirect to "/files/file.m4a" while reading response header from upstream, client:, server: hercules, request: "GET /download/e2a25db11bdbdd783531783eaa16eafdfc86355b/1307089096/file.m4a/ HTTP/1.1", upstream: "", host: "fakehost.blob", referrer: "http://fakehost.blob/music/file.m4a"

Please note "server: hercules".


> server {
>   listen  80;
>   server_name fakehost.blob;

This is not the server where request is processed.

Maxim Dounin

More information about the nginx mailing list