Personal Catalogue: React, Express & MongoDB — Chapter 10, Exercise 2 ===================================================================== TASK Configure the nginx location /catalogue/ block against a real running instance of the app (a second local nginx config is fine for testing), and confirm both a page load and a real API request succeed through the proxy, with Express's own server.js completely unchanged from Chapter 9. SOLUTION Backend running exactly as Chapter 9 left it, with the Chapter 10 frontend build in place: cd catalogue-api node server.js # listening on port 4000, serving both /api/items and the # /catalogue-prefixed static build, completely unmodified from Ch.9 A minimal local nginx config for testing (e.g. /etc/nginx/sites-available/test-catalogue): server { listen 8080; server_name localhost; location /catalogue/ { proxy_pass http://localhost:4000/; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; } } sudo ln -s /etc/nginx/sites-available/test-catalogue /etc/nginx/sites-enabled/ sudo nginx -t sudo systemctl reload nginx Testing a page load through the proxy: curl -i http://localhost:8080/catalogue/ Output: a real 200 response containing the built index.html, with its own