server { listen 80; server_name 127.0.0.1; root /usr/share/nginx/html; index index.html; location / { try_files $uri $uri/ /index.html; } # Optional: Cache static assets for better performance location ~* \.(?:ico|css|js|gif|jpe?g|png|woff2?|eot|ttf|svg|otf)$ { expires 6M; access_log off; add_header Cache-Control "public"; } error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/html; } }