When hosting an spa on Ngix we often run across one simple bug that keeps our pages out of reach when not accessed from a link on the landing page.
And example scenario would be when navigating directly to https://spa-app.com/login
without accessing the landing page, we are greated by a 404 Not found error even though we are certain that our content exists.
A rather simple solution to this would be adding the following line before the end of our Nginx Vhost configuration:
server {
...
try_files $uri $uri/ /index.html;
}