Reputation: 29
I use nginx as frontend, apache as backend. I need cache pictures, but by default 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?
Upvotes: 1
Views: 1598
Reputation: 4621
You need something like this.
if ($upstream_http_content_type ~* "image/") {
DEFINE_YOUR_CACHE_SETTINGS
}
Upvotes: 1