Hello everyone,
I use NGINX as a proxy before apache - this part works fine.
Later, I decided to cache all generated images from uri:
bin/* and put them into cache, so I don't get these images generated all the time my apache (so it free up some CPU).
so my nginx config is:
location ~ /bin/(.*) {
expires max;
add_header Last-Modified "Thu, 26 Mar 2000 17:35:45 GMT";
proxy_ignore_headers "Set-Cookie";
proxy_ignore_headers "Cache-Control";
add_header X-Cache-Status $upstream_cache_status;
proxy_pass http://egomuzika.lt;
proxy_cache my-cache;
proxy_cache_key "$host$request_uri";
proxy_cache_valid 200 302 7d;
proxy_cache_valid 404 1m;
}
But this does not work, X-Cache-Status always returns me MISS.
so it seems it enters the location part, but somehow does no do the caching part...
I also tried with:
proxy_cache_key "$host$request_uri$args"; // added $args at the end - with no luck eigher.
Anyone can point me on right directions? Already spend many hours but with no luck at all.
Tried upgrading from nginx 1.2.4 to 1.4.1 - same results :(
Thank you,
Jaroslav