Nginx 配置之开启缓存过期时间
Nginx 缓存 大约 379 字expires
默认单位:秒。
h
:时m
:分s
:秒y
:年
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";
}
阅读 2802 · 发布于 2019-03-20
————        END        ————
Give me a Star, Thanks:)
https://github.com/fendoudebb扫描下方二维码关注公众号和小程序↓↓↓

昵称:
随便看看
换一批
-
Java 中的锁 ReentrantLock阅读 1199
-
Spring Boot 使用 springdoc-openapi 接入 Swagger2阅读 264
-
软考-系统架构设计师:云计算阅读 1153
-
Nginx 配置之解决 413 错误(Request Entity Too Large)阅读 5138
-
Linux jobs fg bg disown阅读 2193
-
使用 Chrome 进行网页长截图阅读 2313
-
Redis 使用 HyperLogLog 统计独立 IP 数阅读 2289
-
Java 并发编程之 ThreadPoolExecutor 线程池源码解析阅读 965
-
Docker springci 编译 Spring Navtive 工程为 Linux 可执行文件阅读 187
-
Redis 批量删除 key阅读 3397