How to use file_server with multiple SPAs?

You’d be better off using a subdomain for each app.

app1.example.com {
	root * /path/to/app1
	encode gzip
	try_files {path} {path}.html {path}/ /index.html
	file_server
}

app2.example.com {
	root * /path/to/app1
	encode gzip
	try_files {path} {path}.html {path}/ /index.html
	file_server
}