From e142d9f5920997074acfe1267ff03792b124bfe1 Mon Sep 17 00:00:00 2001 From: hesukastro Date: Thu, 5 Feb 2026 13:43:24 +0800 Subject: [PATCH] udpate --- DockerFile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/DockerFile b/DockerFile index ec7b558..91d47a0 100644 --- a/DockerFile +++ b/DockerFile @@ -4,7 +4,14 @@ FROM nginx:alpine # Copy all files from your Git repo into the web server directory COPY ./html/ /usr/share/nginx/html/ -RUN sed -i 's/server_name localhost;/server_name _;/g' /etc/nginx/conf.d/default.conf - +RUN echo 'server { \ + listen 80 default_server; \ + server_name _; \ + root /usr/share/nginx/html; \ + index index.html; \ + location / { \ + try_files $uri $uri/ =404; \ + } \ + }' > /etc/nginx/conf.d/default.conf # Expose port 80 EXPOSE 80 \ No newline at end of file