nginx: Add config for 404 page.

This commit is contained in:
William Floyd 2023-07-14 16:49:12 -05:00
parent 7eaa986423
commit 7844028dd6
Signed by untrusted user who does not match committer: william
GPG key ID: B3EEEDD81893CAF9
2 changed files with 17 additions and 0 deletions

View file

@ -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

16
nginx.conf Normal file
View file

@ -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;
}
}
}