Enable access logs

This commit is contained in:
Mathis 2024-01-05 20:29:25 +01:00
parent 3c71ebe5e2
commit 2ed43b4c83
2 changed files with 19 additions and 1 deletions

View File

@ -11,3 +11,4 @@ RUN hugo mod get -u && \
FROM nginx:stable-alpine FROM nginx:stable-alpine
COPY --from=build /app/public /usr/share/nginx/html/ COPY --from=build /app/public /usr/share/nginx/html/
COPY ./nginx.conf /etc/nginx/conf.d/default.conf

17
nginx.conf Normal file
View File

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