events {} http { include /etc/nginx/mime.types; default_type application/octet-stream; server { listen 80; server_name localhost; location / { root /usr/share/nginx/html; index index.html index.htm; # Next.js static export creates page.html (e.g. contact.html) for routes. # We check $uri.html to allow clean URLs without the .html extension. try_files $uri $uri.html $uri/ /404.html; } } }