but I'm not using upstream directive. Do you mean that it's only possible to upstream instead of direct proxy_pass? I tried that. I still see non-image files in cache. Posted at Nginx Forum: http://forum.nginx.org/read.php?2,228786,228797#msg-228797