server { listen 3100; root /usr/share/nginx/html; index index.html; # SPA fallback: client-side routing (react-router) owns everything under /. location / { try_files $uri /index.html; } }