server {
listen 80;
server_name test.exmaple.cn;
location / {
if ($request_filename ~* .*\.(?:htm|html)$) ## 配置页面不缓存html和htm结尾的文件
{
add_header Cache-Control "private, no-store, no-cache, must-revalidate, proxy-revalidate";
}
root /web/;
index index.html;
try_files $uri $uri/ /index.html =404;
}
}