1

Accessing/refresh a route directly in the browser like /login or /signup returns 404 Not Found.

I build the project and hosted the static files in the /html folder on the Nginx server. The server understands that the route is a folder, but it really isn't. Should I change something in the code block in Nginx, like location / {...} or something in Angular?

Renan
  • 13
  • 4
  • 1
    Nginx should always serve `index.html`, on any route. And then Angular will take care of routing. See https://stackoverflow.com/questions/35038155/how-to-redirect-all-angular-request-to-index-html-in-nginx – mat.hudak Jul 06 '23 at 06:21
  • @mat.hudak it worked for me, thank you so much! – Renan Jul 06 '23 at 11:49

0 Answers0