Like the title says, can I cache images (or whatever) by mime type, not extension? The only relevant info I found is at http://stackoverflow.com/questions/6212361/nginx-cache-file-by-mime-type However, the suggested config is not valid, because proxy directive cannot be used inside if. Posted at Nginx Forum: http://forum.nginx.org/read.php?2,228786,228786#msg-228786