Client-Side Routing and Nginx SPA Configuration (Fixing 404)

Guide on fixing 404 page refresh errors and Nginx fallback architecture for React Router and Vue Router Single Page Applications (SPA).

Read Time
6 minutes
Target Subject
SPA Routing & 404 Fix
Architecture
Nginx try_files Fallback

1. Overview and Learning Objectives

Client-side routing libraries like React Router and Vue Router update browser URLs without making server requests. However, when users refresh pages or directly navigate to subpaths like /dashboard, web servers return 404 errors if /dashboard/index.html does not exist on disk. This guide explains how Flyway automatically resolves this with Nginx fallback rewrites.

2. Target Audience

  • Developers using React Router or Vue Router in Single Page Applications (SPA).
  • Teams troubleshooting 404 errors on page refreshes in production.

3. Related Documentation

Last updated on July 24, 2026
Edit this page on GitHub