Welcome! Log In Create A New Profile

Advanced

X-Accel-Redirect

March 10, 2010 05:45AM
I'm using nginx in two different points.

As reverse proxy, and as webserver.

1) Webserver with php fastcgi

http://www.domain.com/file.zip, is really a php that stores some stats about our customers downloads.
When it has stored all the info it sends an X-Accel-Direct. It works perfectly.

2) Reverse proxy

We have setup some nginx in our customers nodes, to they get better latency, speed, etc...

Everything works ok.


Now the prob is that for earch download, nginx-2 ( reverse proxy ) has to download everythin from nginx-2 ( webserver ) and then upload everything to the client.

This generates a lot of traffic.

As we only need to get some info about the client, we have thought about storing the download folder into nginx-2, and be able to send the x-accel-redirect from nginx-1 to nginx-2.

So the php gets executed in the nginx-1, info stored, and the phisical download done from nginx-2, without transfering gigs and gigs of data.

Is there an easy way to rename the X-Accel-Redirect header on nginx-2 so we can sent it from nginx-1 to nginx-2? So nginx-1 works with the standard X-Accel-Redirect header, and nginx-2 with ( example ) X-Local-Redirect.

Or another way to accomplish this workflow?

Thnx a lot!
Subject Author Posted

X-Accel-Redirect

Alberto March 10, 2010 05:45AM

Re: X-Accel-Redirect

Maxim Dounin March 10, 2010 06:52AM

Re: X-Accel-Redirect

Alberto March 10, 2010 06:59AM

Re: X-Accel-Redirect

Maxim Dounin March 10, 2010 07:16AM

Re: X-Accel-Redirect

Alberto March 10, 2010 08:17AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 309
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready