How to make nginx redirect to index.html?

I am deploying an SPA. It works when I just hit the base URL. But when I hit a deeper URL, I get a 404 from nginx.

How would I configure nginx to make sure it redirects to index.html? Is this through the CircleCI config, or how?

This would be related to NGINX config and not CircleCI.

This is not CircleCI related. I’d recommend having a look at this cheat sheet. You’ll need to set nginx to redirect to index.html :