added 404 for nginx

This commit is contained in:
2025-10-10 01:29:21 -05:00
parent d0f2ef821a
commit f30afa686a
2 changed files with 14 additions and 0 deletions

View File

@@ -21,5 +21,6 @@ RUN zola build --force
FROM nginx:alpine FROM nginx:alpine
COPY --from=builder /site/public /usr/share/nginx/html COPY --from=builder /site/public /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80 EXPOSE 80
CMD ["nginx", "-g", "daemon off;"] CMD ["nginx", "-g", "daemon off;"]

13
nginx.conf Normal file
View File

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