Nginx 1 · Servers and static files

Serve a single-page app

Send unknown paths to index.html so client-side routing works.

location / {
    try_files $uri $uri/ /index.html;
}

Official Nginx 1 documentation

More servers and static files commands

All servers and static files commands · Nginx 1 cheatsheet

Was this page helpful?