From c915c734fcca2344051228078e038d03645a14ed Mon Sep 17 00:00:00 2001 From: Pim Kunis Date: Fri, 19 May 2023 21:12:57 +0200 Subject: [PATCH] add dockerfile and nginx config --- Dockerfile | 4 ++++ nginx.conf | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 Dockerfile create mode 100644 nginx.conf diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..839e090 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,4 @@ +FROM nginx:1.24-bullseye + +COPY ./site-html /var/www/blog +COPY ./nginx.conf /etc/nginx/conf.d/default.conf diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..fa6900f --- /dev/null +++ b/nginx.conf @@ -0,0 +1,18 @@ +server { + listen 80; + server_name pim.kunis.nl; + index index.html index.htm; + root /var/www/blog; + + location / { + try_files $uri $uri/ /index.html; + } + + location ~* \.(?:ico|css|js|gif|jpe?g|png)$ { + expires 30d; + add_header Pragma public; + add_header Cache-Control "public"; + } + + error_page 404 /404.html; +}