From 2ed43b4c83e3e1359fad557fafd19cf001d13d00 Mon Sep 17 00:00:00 2001 From: Mathis Date: Fri, 5 Jan 2024 20:29:25 +0100 Subject: [PATCH] Enable access logs --- Dockerfile | 3 ++- nginx.conf | 17 +++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 nginx.conf diff --git a/Dockerfile b/Dockerfile index 0836c99..8a3a73c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,4 +10,5 @@ RUN hugo mod get -u && \ FROM nginx:stable-alpine -COPY --from=build /app/public /usr/share/nginx/html/ \ No newline at end of file +COPY --from=build /app/public /usr/share/nginx/html/ +COPY ./nginx.conf /etc/nginx/conf.d/default.conf \ No newline at end of file diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..2f15a3b --- /dev/null +++ b/nginx.conf @@ -0,0 +1,17 @@ +server { + listen 80; + listen [::]:80; + server_name localhost; + + access_log /var/log/nginx/access.log main; + + location / { + root /usr/share/nginx/html; + index index.html index.htm; + } + + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root /usr/share/nginx/html; + } +}