server { listen 8080; server_name localhost; root /usr/share/nginx/html; index index.html; location ~* ^/surfing/.*\.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ { expires 1y; add_header Cache-Control "public, immutable"; try_files $uri =404; } location /surfing { try_files $uri /surfing/index.html; } location = / { return 301 /surfing/; } error_page 404 /surfing/index.html; location /health { access_log off; return 200 "healthy\n"; add_header Content-Type text/plain; } }