location ^~ /herlly {
if ($request_filename ~* .*\.(?:htm|html)$)
{
add_header Cache-Control no-store;
}
if ($request_filename ~* .*\.(js|css|jpg|jpeg|gif|png|ico)$)
{
add_header Cache-Control max-age=2592000,s-maxage=68400;
}
alias /data/www/herlly/dist/;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}
Nginx定义差异化缓存配置
原创
©著作权归作者所有:来自51CTO博客作者herlly的原创作品,请联系作者获取转载授权,否则将追究法律责任
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
IaC 管理新思路:Walrus 和 Terraform 的差异化探索
了解Walrus和Terraform的差异
基础设施 IaC Walrus Terraform -
Nginx安全配置
nginx版本号隐藏
nginx 版本号 安全 -
差异化优势
每天进步一点点 ,记录成长、分享思考 。
推送 差异化 商业