Nginx配置之开启缓存过期时间

Nginx大约 354 字
location ~ .*\.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm)$ {
    expires      1m;
}

location ~ .*\.(?:js|css)$ {
    expires      1;
}

location ~ .*\.(?:eot|ttf|woff|woff2)$ {
    expires      1y;
}

location ~ .*\.(?:html|htm)$ {
    add_header Cache-Control "private, no-store, no-cache, must-revalidate, proxy-revalidate";
}
阅读 607 · 发布于 2019-03-20

————        END        ————

扫描下方二维码关注公众号和小程序↓↓↓

昵称:
随便看看换一批