소스 검색

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 {