<html><body><div>I've found that the easiest , most accurate way of diagnosing cache related issues is to use the incredible rebot.org service. If you can point redbot at your nginx, and also at your back end, it will identify anything that prevenst the resource being cacehable. If your website isnt visible from the internet you can either install your own copy of redbot or use an ssh tunnell to make it visible temporarily.</div><div><br data-mce-bogus="1"></div><div>The next approach si to run a debug version of nginx and to step by step unpick the setup to see whats broken.</div><div><br data-mce-bogus="1"></div><div>Peter</div><div><br data-mce-bogus="1"></div><div>I wopuld suggest begiining with a small filebefore then lovinto a laregr number</div><div><br>On Jun 26, 2017, at 01:39 PM, deivid__ <nginx-forum@forum.nginx.org> wrote:<br><br></div><div><blockquote type="cite"><div class="msg-quote"><div class="_stretch"><span class="body-text-content">Hi,<br>I currently get requests that are resolved with an external server to a file<br>with X-Accel-Redirect:<br><br>for example:<br><br>/data/asd-asd-asd -> proxied to a backend -> resolves to file.xls<br>/data/qqq-qqq-qqq -> proxied to a backend -> resolves to file.xls<br>/data/123-123-123 -> proxied to a backend -> resolves to image.jpeg<br><br>I want to cache the resulting files with nginx, as the initial access is<br>very costly (they are accessed over the network). On first access they<br>should be copied to a local cache, following requests should also go to the<br>backend but actually serve the file from cache.<br><br>My current config:<br><a href="https://zerobin.davidventura.com.ar/?0018df75a5d31f2c#Un5Eo10lo4eRnhY7ngQiHlSTErCVH/8zjRN+qS0JSl0=" data-mce-href="https://zerobin.davidventura.com.ar/?0018df75a5d31f2c#Un5Eo10lo4eRnhY7ngQiHlSTErCVH/8zjRN+qS0JSl0=">https://zerobin.davidventura.com.ar/?0018df75a5d31f2c#Un5Eo10lo4eRnhY7ngQiHlSTErCVH/8zjRN+qS0JSl0=</a><br><br><br>Note: The files are quite large (up to 4gb)<br><br>I added the proxy_cache directives to both the requests path and the<br>internal path but none of them are working.<br><br>/cache/ is never populated, and the X-*-Cache headers are not present in the<br>response<br><br>Posted at Nginx Forum: <a href="https://forum.nginx.org/read.php?2,275138,275138#msg-275138" data-mce-href="https://forum.nginx.org/read.php?2,275138,275138#msg-275138">https://forum.nginx.org/read.php?2,275138,275138#msg-275138</a><br><br>_______________________________________________<br>nginx mailing list<br><a href="mailto:nginx@nginx.org" data-mce-href="mailto:nginx@nginx.org">nginx@nginx.org</a><br><a href="http://mailman.nginx.org/mailman/listinfo/nginx" data-mce-href="http://mailman.nginx.org/mailman/listinfo/nginx">http://mailman.nginx.org/mailman/listinfo/nginx</a><br></span></div></div></blockquote></div></body></html>