I use nginx as frontend, apache as backend. I need cache pictures, but by defa开发者_StackOverflow社区ult nginx is caching file by extentions. Apache takes pictures from db and send it without extentions. Can nginx cache files by mime type and how?
You need something like this.
if ($upstream_http_content_type ~* "image/") {
DEFINE_YOUR_CACHE_SETTINGS
}
精彩评论