Welcome! Log In Create A New Profile

Advanced

proxy_cache and X-Accel-Redirect

June 26, 2017 01:39PM
Hi,
I currently get requests that are resolved with an external server to a file with X-Accel-Redirect:

for example:

/data/asd-asd-asd -> proxied to a backend -> resolves to file.xls
/data/qqq-qqq-qqq -> proxied to a backend -> resolves to file.xls
/data/123-123-123 -> proxied to a backend -> resolves to image.jpeg

I want to cache the resulting files with nginx, as the initial access is very costly (they are accessed over the network). On first access they should be copied to a local cache, following requests should also go to the backend but actually serve the file from cache.

My current config: https://zerobin.davidventura.com.ar/?0018df75a5d31f2c#Un5Eo10lo4eRnhY7ngQiHlSTErCVH/8zjRN+qS0JSl0=


Note: The files are quite large (up to 4gb)

I added the proxy_cache directives to both the requests path and the internal path but none of them are working.

/cache/ is never populated, and the X-*-Cache headers are not present in the response
Subject Author Posted

proxy_cache and X-Accel-Redirect

deivid__ June 26, 2017 01:39PM

Re: proxy_cache and X-Accel-Redirect

pbooth June 26, 2017 03:16PM

Re: proxy_cache and X-Accel-Redirect

Francis Daly June 26, 2017 07:30PM

Re: proxy_cache and X-Accel-Redirect

deivid__ June 27, 2017 11:12AM

Re: proxy_cache and X-Accel-Redirect

Francis Daly June 28, 2017 08:52AM

Re: proxy_cache and X-Accel-Redirect

Igor A. Ippolitov June 27, 2017 02:54AM

Re: proxy_cache and X-Accel-Redirect

deivid__ June 27, 2017 11:49AM

Re: proxy_cache and X-Accel-Redirect

Igor A. Ippolitov June 27, 2017 12:18PM

Re: proxy_cache and X-Accel-Redirect

deivid__ June 27, 2017 12:56PM

Re: proxy_cache and X-Accel-Redirect

pbooth June 27, 2017 01:22PM

Re: proxy_cache and X-Accel-Redirect

deivid__ June 27, 2017 02:27PM

Re: proxy_cache and X-Accel-Redirect

Igor A. Ippolitov June 28, 2017 05:30AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 304
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