proxy_cache is not working

reaper nginx-forum at forum.nginx.org
Tue May 17 13:11:00 UTC 2016


It was already set but apparently wasn't being used.

location /static/ {
    try_files $uri @apache-cache;
    proxy_cache_valid 5m;
}

location @apache-cache {
    ...
    proxy_ignore_headers Set-Cookie Expires Cache-Control;
    proxy_hide_header Set-Cookie;

    internal;
}

Moved this directive to second location and now it's all fine.

Thanks!

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,266939,266942#msg-266942



More information about the nginx mailing list