proxy_cache seems not working with X-Accel-Redirect

bdesemb nginx-forum at
Wed Jan 11 16:10:51 UTC 2017

Thanks for your help but there is still something I don't understand. I have
dynamic access for resources. For me, I have 3 different locations in 2
servers and your conf only contains 2. I have my location of the client
request, the location of the X-Accel-Redirect and the location where caching

I tried this but it's not working. I got a 200 with an empty body.

server {
listen 80
location /data {

location /protected_data {
alias /var/local/data/;
listen 8081 {
location / {
proxy_pass; #upstream server
proxy_cache my_cache;
proxy_ignore_headers X-Accel-Redirect;

What am I doing wrong?

Posted at Nginx Forum:,241734,271935#msg-271935

More information about the nginx mailing list