开发者

Nginx cache file by mime type

开发者 https://www.devze.com 2023-03-10 08:29 出处:网络
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 extenti

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

精彩评论

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