Relative Content

Tag Archive for nginxsingle-page-application

Nginx not serving custom 404 page for SPA in a subdirectory

I have two Single Page Applications (SPAs) served by Nginx. One is located in /usr/share/nginx/html and the other in a subdirectory /usr/share/nginx/html/app2. Both applications have identical routing and custom 404 page implementations. The first application correctly serves the custom 404 page, but the second application (app2) redirects to the default Nginx welcome page when a non-existent route is accessed.