|
@@ -205,7 +205,12 @@ docker run -d --name svapi-dev -p 8080:8080 -e SMARTBOTIC_VECTORAPI_KEY=dev svap
|
|
|
- **PROD HAS TWO HOSTNAMES AND THEY SERVE DIFFERENT SURFACES. Probing the customer-facing one at `/` answers 404 BY DESIGN.** Added 2026-10-15.
|
|
- **PROD HAS TWO HOSTNAMES AND THEY SERVE DIFFERENT SURFACES. Probing the customer-facing one at `/` answers 404 BY DESIGN.** Added 2026-10-15.
|
|
|
- `qdrant-1.shop.static.shopcall.ai/rag/` - the ORIGINAL mount, unchanged and still the full surface including the admin web UI. `proxy_pass` carries a TRAILING SLASH here, which strips the `/rag` prefix before vectorapi sees it.
|
|
- `qdrant-1.shop.static.shopcall.ai/rag/` - the ORIGINAL mount, unchanged and still the full surface including the admin web UI. `proxy_pass` carries a TRAILING SLASH here, which strips the `/rag` prefix before vectorapi sees it.
|
|
|
- `global-api-01.smartbotics.ai` - the CUSTOMER-FACING name, at the ROOT, with its own Let's Encrypt cert (expires 2027-01-13, `--redirect` so 80 answers 301). `proxy_pass` has NO trailing slash, so the path reaches vectorapi unchanged. The two mounts are deliberately different and must never be copied onto each other.
|
|
- `global-api-01.smartbotics.ai` - the CUSTOMER-FACING name, at the ROOT, with its own Let's Encrypt cert (expires 2027-01-13, `--redirect` so 80 answers 301). `proxy_pass` has NO trailing slash, so the path reaches vectorapi unchanged. The two mounts are deliberately different and must never be copied onto each other.
|
|
|
- **It is a WHITELIST, not a deny-list on `/`, and that is the load-bearing choice**: `/api/`, `/docs` (prefix, because the page fetches `/docs/rapidoc-min.js`), `/openapi.json`, `/llms.txt` and `/healthz` are proxied, everything else returns 404. vectorapi serves its ADMIN WEB UI at `/`, which does not belong on a hostname handed to customers - and with a deny-list, a route added by a later release would be exposed the moment the package upgraded, with nobody noticing. The cost is that a genuinely public new route must be added here deliberately, which is the point. The shared proxy settings (180 s read timeout for the server-side embedding, 10 MB body) live in `/etc/nginx/snippets/vectorapi-proxy.conf` and are included by every location, so the two cannot drift.
|
|
|
|
|
|
|
+ **It is a WHITELIST, not a deny-list on `/`, and that is the load-bearing choice**: `/api/` and `/healthz` are proxied, everything else returns 404. vectorapi serves its ADMIN WEB UI at `/`, which does not belong on a hostname handed to customers - and with a deny-list, a route added by a later release would be exposed the moment the package upgraded, with nobody noticing. The cost is that a genuinely public new route must be added here deliberately, which is the point. The shared proxy settings (180 s read timeout for the server-side embedding, 10 MB body) live in `/etc/nginx/snippets/vectorapi-proxy.conf` and are included by every location, so the two cannot drift.
|
|
|
|
|
+ **`/docs`, `/openapi.json` and `/llms.txt` WERE whitelisted here for about five hours on 2026-10-15, and were then removed by the owner's decision: the API is the only thing this hostname serves.** The reason is worth keeping because it is not secrecy - nothing there was callable without a key. The docs page renders the COMPLETE operation list, admin key management, project deletion, the read-only lock and the server-wide stats included, so it published a catalogue of what to come back and try. A customer needs the one URL they were given plus minimal docs for the part they actually use. All three stay reachable on the OLD name under `/rag/`, which is where we read them. `/healthz` stays because it was verified to return `{"status":"ok"}` and nothing else, so an outside monitor needs no credential. The 404 discloses nothing further either: `server_tokens` is already off globally, so it answers `Server: nginx` with no version.
|
|
|
|
|
+ **A KEYED 404 IS THE CONTROL THAT PROVES THE BLOCK IS NGINX'S OWN.** `/docs` answers 404 WITH a valid admin key as well as without one. Without that control a 404 on this host is equally consistent with "the route is gone" and "the request was not authorized" - and those are different stories, one of which would come back the moment a customer sent a key.
|
|
|
|
|
+ **REMOVING A ROUTE DOES NOT CLOSE A PAGE THAT IS ALREADY OPEN, AND THE HALF-DEAD RESULT READS LIKE A SERVER FAULT.** Measured in a browser immediately after the reload: the HTML and `rapidoc-min.js` came from the browser's DISK CACHE so the title still rendered, while `openapi.json` went to the network and 404'd - leaving a page that looked alive and listed nothing. A cache-busting query string answered nginx's own 404, which is the real state. So verify a withdrawal with a URL the cache has never seen, and expect anyone who had the page open to meet a BROKEN docs page rather than an absent one.
|
|
|
|
|
+ **THE ERROR PAGES ARE BRANDED NOW, AND ONE SETTING DECIDES WHETHER THAT IS COSMETIC OR BREAKING.** `/etc/nginx/snippets/branded-errors.conf` maps 403/404/500/502/503/504 to static pages under `/var/www/smartbotics-errors/_brand/`, styled from the design tokens read off smartbotics.ai (`--gradient-primary`, `--foreground`, `--radius`), bilingual EN/HU, with a dark-mode variant. **`proxy_intercept_errors` is OFF, which is the default, and MUST STAY OFF**: it is the single setting that would replace vectorapi's own `{"error":{"code":...}}` JSON with HTML and silently break every client that parses our errors. Verified after the change that an unauthenticated `/api/v1/version` still answers the JSON envelope, because the branding is only meant to cover the errors NGINX ITSELF raises. Everything the page needs is on local disk, so the 502 page still renders when the upstream it is reporting on is down - an error page that fetched its own assets through the proxy would be blank in exactly the case it exists for. The pages are `internal` (unreachable as paths); only the logo is not, since the browser must fetch it.
|
|
|
|
|
+ **AN ERROR PAGE'S RELATIVE URL RESOLVES AGAINST THE REQUESTED PATH, NOT AGAINST THE ERROR PAGE'S OWN PATH, AND EVERY TEXT-BASED CHECK PASSES WHILE IT IS BROKEN.** The pages first carried `src="logo.png"`, which is correct relative to `/_brand/404.html` and is never what the browser resolves: nginx's internal redirect leaves the URL as the REQUEST, so the logo was fetched from `/logo.png`, or `/some/deep/logo.png`, and 404'd every time. curl said `status=404 type=text/html` and the body contained the brand name twice, so it looked finished. **It was a screenshot that found it** - the broken-image icon - which is the one check that could. A local preview had also passed, because the file happened to sit beside the HTML there, so the preview was testing a layout the server can never reproduce. Absolute `/_brand/logo.png` fixes it, and the test that proves it is a DEEP path, not the one the page was first opened at.
|
|
|
**Two traps met while doing it.** The half-written config was a BYTE COPY of the qdrant one with a single `server_name` changed, so it still carried full duplicate `qdrant-1` blocks on 443 and 80 and pointed at qdrant's port 6333 and qdrant's certificate - enabling that would have put conflicting server blocks on the live site and served a cert that covers neither name. And **the first request after `systemctl reload nginx` hit the old worker set and answered 404**, which read exactly like a broken location block; every path passed on a retry seconds later. Do not diagnose an nginx location from a request issued in the same breath as the reload.
|
|
**Two traps met while doing it.** The half-written config was a BYTE COPY of the qdrant one with a single `server_name` changed, so it still carried full duplicate `qdrant-1` blocks on 443 and 80 and pointed at qdrant's port 6333 and qdrant's certificate - enabling that would have put conflicting server blocks on the live site and served a cert that covers neither name. And **the first request after `systemctl reload nginx` hit the old worker set and answered 404**, which read exactly like a broken location block; every path passed on a retry seconds later. Do not diagnose an nginx location from a request issued in the same breath as the reload.
|
|
|
- **Prod's database binds `localhost`, not `0.0.0.0`** (`storage.bind_address`), which is why it is only reachable from vectorapi on the same box - correct, and worth knowing before wondering why a port-mapped copy refuses connections.
|
|
- **Prod's database binds `localhost`, not `0.0.0.0`** (`storage.bind_address`), which is why it is only reachable from vectorapi on the same box - correct, and worth knowing before wondering why a port-mapped copy refuses connections.
|
|
|
- **`policy-rc.d` DOES NOT HOLD THE DATABASE PACKAGE. It blocks `invoke-rc.d`, and that postinst calls `systemctl` DIRECTLY.** Measured the hard way on 2026-10-12: a `policy-rc.d` returning 101 was in place, the pinned install ran at 18:21:12, and the service restarted anyway - the 2.17.2 first-boot migration ran to completion before the install command had even returned. **A hold point three consumers had been promised simply did not exist**, and that cost TWO separate things, not one. One consumer lost the chance to say "wait, a call is live" that they had explicitly been offered. **And because the install itself triggered the migration, the outage happened at 18:21 rather than in the 18:30 slot all three had approved** - it ran NINE MINUTES EARLY, outside the approved window, which is a governance failure distinct from the missing check. A consumer put that second point in the record; my own account had blurred it into the first, which understated it.
|
|
- **`policy-rc.d` DOES NOT HOLD THE DATABASE PACKAGE. It blocks `invoke-rc.d`, and that postinst calls `systemctl` DIRECTLY.** Measured the hard way on 2026-10-12: a `policy-rc.d` returning 101 was in place, the pinned install ran at 18:21:12, and the service restarted anyway - the 2.17.2 first-boot migration ran to completion before the install command had even returned. **A hold point three consumers had been promised simply did not exist**, and that cost TWO separate things, not one. One consumer lost the chance to say "wait, a call is live" that they had explicitly been offered. **And because the install itself triggered the migration, the outage happened at 18:21 rather than in the 18:30 slot all three had approved** - it ran NINE MINUTES EARLY, outside the approved window, which is a governance failure distinct from the missing check. A consumer put that second point in the record; my own account had blurred it into the first, which understated it.
|