html不进行缓存,将js和css文件进行缓存配置
location ^~ /abc { 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/abc/dist/; index index.html index.htm; try_files $uri $uri/ /index.html; }