From 5301b7831c00e394d4b322f39b46c067bbd76396 Mon Sep 17 00:00:00 2001 From: Constantin Simonis Date: Thu, 23 Jan 2025 13:30:37 +0100 Subject: [PATCH] rm default nginx page --- Dockerfile | 1 + nginx.conf | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 nginx.conf diff --git a/Dockerfile b/Dockerfile index 26bad05..8e288b1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,6 @@ FROM nginx:latest COPY src /usr/share/nginx/html +COPY nginx.conf /etc/nginx/conf.d/default.conf CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..8d0740d --- /dev/null +++ b/nginx.conf @@ -0,0 +1,14 @@ +server { + listen 80; + server_name localhost; + + location / { + try_files $uri $uri/ =404; + } + + error_page 404 = @empty404; + + location @empty404 { + return 404; + } +} \ No newline at end of file