From 7844028dd625710b0193e2a3f931cc47785c1b58 Mon Sep 17 00:00:00 2001 From: William Floyd Date: Fri, 14 Jul 2023 16:49:12 -0500 Subject: [PATCH] nginx: Add config for 404 page. --- Dockerfile | 1 + nginx.conf | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 nginx.conf diff --git a/Dockerfile b/Dockerfile index ee6c3f9..e9d3991 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,3 +2,4 @@ FROM klakegg/hugo:onbuild AS hugo FROM nginx:alpine-slim COPY --from=hugo /target /usr/share/nginx/html +COPY nginx.conf /etc/nginx/nginx.conf \ No newline at end of file diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..099631e --- /dev/null +++ b/nginx.conf @@ -0,0 +1,16 @@ + +user nginx; +worker_processes auto; +error_log /var/log/nginx/error.log notice; +pid /var/run/nginx.pid; +events { + worker_connections 1024; +} +http { + server { + root /usr/share/nginx/html; + location / { + error_page 404 /404.html; + } + } +} \ No newline at end of file