I would like to see how to configure Caddy v2 to serve a SPA application.
It’s a basic configuration for any SPA application, that is, the server should always serve the index.html if a particular path is not found.
I’m trying the rewrite directive as follows, but it’s not working.
To clarify, for anyone finding this from a search, the only relevant part is try_files {path} / (and of course file_server and root but those are standard for static files). Everything else is irrelevant to SPAs.