# nginx config for the prod reverse proxy A **copy of what is running on the prod droplet**, kept here so it is reviewable and recoverable. Nothing in this directory is deployed by the build or by any package: editing a file here changes nothing until it is copied to the host. The host is the source of truth; this is the backup and the review surface. ## What is here | file | installed as | |---|---| | `global-api-01.smartbotics.ai.conf` | `/etc/nginx/sites-available/global-api-01.smartbotics.ai` (symlinked into `sites-enabled`) | | `vectorapi-proxy.conf` | `/etc/nginx/snippets/vectorapi-proxy.conf` | | `branded-errors.conf` | `/etc/nginx/snippets/branded-errors.conf` | | `errors/_brand/*` | `/var/www/smartbotics-errors/_brand/` | The older hostname's config (`qdrant-1.shop.static.shopcall.ai`, mount `/rag/`) is deliberately NOT copied here: it also fronts another service, so this repo is the wrong place for it. ## The two things worth reading before editing **The customer-facing host is a WHITELIST.** Only `/api/` and `/healthz` are proxied; everything else answers 404, the admin web UI and the docs included. A deny-list would expose whatever a later release adds, the moment the package upgrades, with nobody noticing. Adding a route here is meant to be a decision. **`proxy_intercept_errors` must stay off.** The branded pages are for the errors nginx itself raises. With interception on, vectorapi's own JSON error envelope would be replaced by HTML and every client parsing it would break. ## Applying a change scp packaging/nginx/branded-errors.conf prod:/tmp/ ssh prod 'sudo cp /tmp/branded-errors.conf /etc/nginx/snippets/ && sudo nginx -t && sudo systemctl reload nginx' Then verify from OUTSIDE, and not in the same breath as the reload: the first request after a reload can land on the old worker set and answer 404, which reads exactly like a broken location block.