瀏覽代碼

feat: 更新nginx.cof

gatsby 1 月之前
父節點
當前提交
6cd523d1f0
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      frontend/nginx.conf

+ 5 - 0
frontend/nginx.conf

@@ -19,6 +19,11 @@ server {
         try_files $uri $uri/ /index.html;
     }
 
+    location /web {
+        alias /usr/share/nginx/html;
+        try_files $uri $uri/ /web/index.html; #解决页面刷新404问题
+    }
+
     error_page 404 /index.html;
     error_page 500 502 503 504 /50x.html;
     location = /50x.html {