Fix registerSW.js 404 — add root to server block

PWA exact-match location blocks had no root directive so try_files $uri
resolved against nginx's default /etc/nginx/html instead of
/usr/share/nginx/html. Moving root to server level fixes all three
PWA blocks (registerSW.js, sw.js, manifest.webmanifest).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
jtricerolph 2026-07-12 13:23:38 +00:00
parent 2743b0e877
commit c63f8c5c4d

View file

@ -1,4 +1,6 @@
server {
root /usr/share/nginx/html;
location = /rates/manifest.webmanifest {
default_type application/manifest+json;
add_header Cache-Control "no-cache";