From 24c5b38351a79f3fd13d6d784b88f6622ba91326 Mon Sep 17 00:00:00 2001 From: Nijat <38523713+nijaty@users.noreply.github.com> Date: Fri, 9 Jan 2026 14:06:25 +0400 Subject: [PATCH 1/3] Added the COPY default.conf /etc/nginx/http.d/default.conf line into Dockerfile --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index 89b281f..fe10cd8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,6 +6,8 @@ RUN apk --update add nginx COPY 2048 /usr/share/nginx/html +COPY default.conf /etc/nginx/http.d/default.conf + EXPOSE 80 CMD ["nginx", "-g", "daemon off;"] From e52f3d82504d5714eec0569c93f41cfa46ee49ef Mon Sep 17 00:00:00 2001 From: Nijat <38523713+nijaty@users.noreply.github.com> Date: Fri, 9 Jan 2026 14:11:11 +0400 Subject: [PATCH 2/3] Added the new default.conf The default.conf file into the container redirect the location / to the 404, but in this file I've configured root to see the /usr/share/nginx/html folder --- default.conf | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 default.conf diff --git a/default.conf b/default.conf new file mode 100644 index 0000000..b2e535a --- /dev/null +++ b/default.conf @@ -0,0 +1,14 @@ +server { + listen 80 default_server; + listen [::]:80 default_server; + + root /usr/share/nginx/html; + index index.html; + + location / { + try_files $uri $uri/ =404; + } + + location = /404.html { + internal; + From e9e81f1bc1bdf316a10c3db5fbb7f08aab36b3e8 Mon Sep 17 00:00:00 2001 From: Nijat <38523713+nijaty@users.noreply.github.com> Date: Fri, 9 Jan 2026 14:38:59 +0400 Subject: [PATCH 3/3] Update default.conf --- default.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/default.conf b/default.conf index b2e535a..f974ef0 100644 --- a/default.conf +++ b/default.conf @@ -11,4 +11,5 @@ server { location = /404.html { internal; - + } +}