I'm running several SPAs in separate folders together with some static files. The structure is as follows:
|
|- index.html
|- foobar.html
|---- SPA1/
| |- index.html
| |---- SPA1_1/
| |- index.html
|---- SPA2/
|- index.html
The expected behavior is to:
- serve all
/SPA1/SPA1_1/foo/bar
withSPA1/SPA1_1/index.html
- serve all
SPAx/foo/bar
withSPAx/index.html
- serve
/not_exist
with/index.html
- serve
/foobar.html
with/foobar.html
In short, I want nginx to try the following paths in order:
$uri
$uri
's closest parent
Is there any way to achieve this without specifying rules for each SPA directory?