From f30afa686a9e65566a785d8f6e6a82341a21d2b2 Mon Sep 17 00:00:00 2001 From: Raphael Bitton Date: Fri, 10 Oct 2025 01:29:21 -0500 Subject: [PATCH] added 404 for nginx --- Dockerfile | 1 + nginx.conf | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 nginx.conf diff --git a/Dockerfile b/Dockerfile index c397769..6610695 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,5 +21,6 @@ RUN zola build --force FROM nginx:alpine COPY --from=builder /site/public /usr/share/nginx/html +COPY nginx.conf /etc/nginx/conf.d/default.conf EXPOSE 80 CMD ["nginx", "-g", "daemon off;"] diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..a5e80b6 --- /dev/null +++ b/nginx.conf @@ -0,0 +1,13 @@ +server { + listen 80 default_server; + server_name _; + + root /usr/share/nginx/html; + index index.html; + + location / { + try_files $uri $uri/ =404; + } + + error_page 404 /404.html; +}