Change nginx.conf to listen on port 3000 and fix error_page

This commit is contained in:
Max Schmidt 2023-10-24 10:07:50 +02:00
parent ca7e679ebb
commit 36703434d4

View File

@ -10,11 +10,10 @@ http {
gzip_buffers 16 8k; gzip_buffers 16 8k;
gzip_http_version 1.1; gzip_http_version 1.1;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript; 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 { server {
listen 80; listen 3000;
location / { location / {
root /usr/share/nginx/html; root /usr/share/nginx/html;
try_files $uri $uri/ =404; try_files $uri $uri/ =404;
@ -23,18 +22,20 @@ http {
location /error_page.html { location /error_page.html {
internal; internal;
} }
location ~* \.(jpg|jpeg|png|gif|ico|css|html)$ { location ~* \.(jpg|jpeg|png|gif|ico|css|html)$ {
expires 30d; expires 30d;
add_header Pragma public; add_header Pragma public;
add_header Cache-Control "public"; add_header Cache-Control "public";
} }
location ~* \.js$ { location ~* \.js$ {
expires 30d; expires 30d;
add_header Pragma public; add_header Pragma public;
add_header Cache-Control "public"; add_header Cache-Control "public";
add_header Content-Type application/javascript; add_header Content-Type application/javascript;
} }
error_page 404 /404.html;
error_page 404 /error_page.html;
} }
} }