build: 更新 Dockerfile 和 Nginx 配置
- 从 /etc/nginx/conf.d/ 目录中删除所有 .conf 文件
- 注释掉 nginx.conf 中的 root 和 index 指令
Change-Id: I5e860734c5b0f595ebce34a0eccf15ddf672a427
diff --git a/Dockerfile b/Dockerfile
index f37ae8d..940105e 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -16,6 +16,7 @@
COPY dist /usr/share/nginx/html
COPY 50x.html /usr/share/nginx/html
+RUN rm -f /etc/nginx/conf.d/*.conf
# 复制 Nginx 配置文件
COPY nginx.conf /etc/nginx/conf.d/default.conf
diff --git a/nginx.conf b/nginx.conf
index f47bcb6..7033752 100644
--- a/nginx.conf
+++ b/nginx.conf
@@ -3,8 +3,8 @@
server_name team12.10813352.xyz;
# 前端静态文件配置
- root /usr/share/nginx/html;
- index index.html;
+ # root /usr/share/nginx/html;
+ # index /dist/index.html;
# 解决 React Router 单页应用路由问题
location / {