From 8f57ae8e51e47f29b34d11204385db0a31666fde Mon Sep 17 00:00:00 2001 From: Johan Date: Tue, 17 Mar 2026 00:49:44 +0100 Subject: [PATCH] Initial React project --- nginx/default.conf | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 nginx/default.conf diff --git a/nginx/default.conf b/nginx/default.conf new file mode 100644 index 0000000..2ab83c5 --- /dev/null +++ b/nginx/default.conf @@ -0,0 +1,25 @@ +server { + listen 8080; + server_name _; + + root /usr/share/nginx/html; + index index.html; + + location / { + try_files $uri $uri/ /index.html; + } + + location = /robots.txt { + add_header Cache-Control "public, max-age=3600"; + } + + location = /sitemap.xml { + add_header Cache-Control "public, max-age=3600"; + } + + location ~* \.(?:css|js|mjs|png|jpg|jpeg|gif|ico|svg|webp|woff2?)$ { + expires 7d; + add_header Cache-Control "public, max-age=604800, immutable"; + try_files $uri =404; + } +}