Reloading a page like /settings/profile gives a 404 when the frontend router lives in one index.html.
location / {
try_files $uri $uri/ /index.html;
}
try_files checks the listed paths in order: a file, then a directory, then the last argument, which is an internal redirect to /index.html. The last item is not checked for existence, and it can also be a status like =404. If the same server block also handles API paths, give them their own location, because anything unmatched there returns the HTML page with status 200.
Further reading: ngx_http_core_module: try_files
Going deeper: 🛜 Guide: AdGuard Home + Tailscale (Secure Split-Horizon DNS)