提交 e7e6a442 authored 作者: zhanrongzhen's avatar zhanrongzhen

设置缓存

上级 73d5fb63
...@@ -133,12 +133,13 @@ http { ...@@ -133,12 +133,13 @@ http {
location /download/ { location /download/ {
internal; # 标记为内部 location,不允许外部直接访问 internal; # 标记为内部 location,不允许外部直接访问
alias /var/www/html/resources/default/; # 设置文件根目录 alias /var/www/html/resources/default/; # 设置文件根目录
etag on; #etag on;
expires 1d;
#add_header Cache-Control "no-store, no-cache, must-revalidate, max-age=0"; #add_header Cache-Control "no-store, no-cache, must-revalidate, max-age=0";
#add_header Pragma "no-cache"; #add_header Pragma "no-cache";
#add_header Expires "0"; #add_header Expires "0";
#add_header Cache-Control "max-age=86400";
add_header Cache-Control "no-cache, must-revalidate";
sendfile on; sendfile on;
} }
# 未匹配的请求 # 未匹配的请求
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论