开发者

Nginx cache file by mime type

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
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜