From 36703434d486ec60079bed8c9e0ab6d52b9d00eb Mon Sep 17 00:00:00 2001 From: Max Schmidt Date: Tue, 24 Oct 2023 10:07:50 +0200 Subject: [PATCH] Change nginx.conf to listen on port 3000 and fix error_page --- astro/nginx.conf | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/astro/nginx.conf b/astro/nginx.conf index c7597ef..a3c1a6a 100644 --- a/astro/nginx.conf +++ b/astro/nginx.conf @@ -10,11 +10,10 @@ http { gzip_buffers 16 8k; gzip_http_version 1.1; gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript; - default_type application/octet-stream; server { - listen 80; - + listen 3000; + location / { root /usr/share/nginx/html; try_files $uri $uri/ =404; @@ -23,18 +22,20 @@ http { location /error_page.html { internal; } - + location ~* \.(jpg|jpeg|png|gif|ico|css|html)$ { expires 30d; add_header Pragma public; add_header Cache-Control "public"; } + location ~* \.js$ { expires 30d; add_header Pragma public; add_header Cache-Control "public"; add_header Content-Type application/javascript; } - error_page 404 /404.html; + + error_page 404 /error_page.html; } } \ No newline at end of file