Personal Catalogue: React & Firebase — Chapter 10, Exercise 2 ===================================================================== TASK Configure the nginx location /catalogue/ block against a real, deployed Firebase Hosting site (a second local nginx config is fine for testing), including the Host header override and proxy_ssl_server_name. Confirm the page loads correctly, then temporarily remove just the Host header line and observe what happens. SOLUTION Full config, as given in the chapter: server { listen 443 ssl; server_name existing-site.com; location /catalogue/ { proxy_pass https://catalogue-prod.web.app/; proxy_set_header Host catalogue-prod.web.app; proxy_ssl_server_name on; } } After `nginx -s reload`, visiting https://existing-site.com/catalogue/ loads the real, working catalogue app — the page renders correctly, and its own assets (already built with the /catalogue/ base prefix from Exercise 1) load without any 404s. Temporary change — remove the Host header override: location /catalogue/ { proxy_pass https://catalogue-prod.web.app/; # proxy_set_header Host catalogue-prod.web.app; (commented out) proxy_ssl_server_name on; } Reloading nginx and revisiting https://existing-site.com/catalogue/ now: nginx forwards the request with its own real default Host header value, Host: existing-site.com, unchanged from what the original browser request carried. Firebase Hosting's own routing has no project registered under that hostname, so the request either fails outright (a connection-level error) or returns Firebase's own generic "Site Not Found" page rather than the real catalogue app — confirming that the Host header override isn't a defensive extra, it's the one thing that actually tells Firebase's shared infrastructure which real project's content to serve. WHY THIS WORKS AS AN ANSWER ---------------------------- It configures and tests the real, working setup first, then deliberately isolates exactly one line (the Host header override) to confirm it's genuinely load-bearing by observing the real failure that results from removing only that piece, rather than assuming its purpose without checking.