From 75b1821d86d0cd077161868edd8fa3f87b75c43a Mon Sep 17 00:00:00 2001 From: thehrz Date: Sat, 12 Aug 2023 17:25:16 +0800 Subject: [PATCH] pref: update nginx config --- Dockerfile | 2 +- nginx/conf.d/www.conf | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 39ccbea..c309a24 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,7 +13,7 @@ RUN pnpm build FROM nginx:stable-alpine as production-stage COPY --from=build-stage /app/nginx/conf.d /etc/nginx/conf.d -COPY --from=build-stage /app/dist /usr/local/nginx/html/ +COPY --from=build-stage /app/dist /usr/share/nginx/html/ EXPOSE 80 CMD ["nginx", "-g", "daemon off;"] diff --git a/nginx/conf.d/www.conf b/nginx/conf.d/www.conf index 2bee6aa..8897866 100644 --- a/nginx/conf.d/www.conf +++ b/nginx/conf.d/www.conf @@ -13,7 +13,7 @@ server { gzip_vary on; location / { - root /usr/local/nginx/html/; - try_files $uri $uri/ /index.html; + root /usr/local/share/html; + index index.html index.htm; } } \ No newline at end of file