|
@@ -100,3 +100,21 @@ location ^~/page_docs {
|
|
|
}
|
|
|
```
|
|
|
|
|
|
+```
|
|
|
+# 静态资源配置
|
|
|
+# 1. 禁止html缓存
|
|
|
+location ~ ^\/(.*).html {
|
|
|
+ add_header Pragma no-cache;
|
|
|
+ add_header Expires 0;
|
|
|
+ add_header Cache-Control no-cache,no-store,must-revalidate;
|
|
|
+
|
|
|
+ root html;
|
|
|
+}
|
|
|
+# 2. 静态资源配置(vue程序刷新404问题)
|
|
|
+location ~ ^\/page_(.*?)\/ {
|
|
|
+ root html;
|
|
|
+ index index.html;
|
|
|
+ try_files $uri $uri/ /page_$1/index.html;
|
|
|
+}
|
|
|
+```
|
|
|
+
|