0
点赞
收藏
分享

微信扫一扫

Nginx定义差异化缓存配置

王传学 2023-05-08 阅读 76

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;
    }

举报

相关推荐

0 条评论