From f21ab7d46df904ece47ba59f1beba09515b59e58 Mon Sep 17 00:00:00 2001 From: Pjotr Date: Sat, 7 Nov 2026 13:36:47 +0000 Subject: etc: drop-in nginx config for vesuvio.pu.ac.uk/gn4 docs/nginx.md explained the pieces; this is the assembled file for the deployment actually being set up, so it can be reviewed and installed without stitching anything together. It lives in etc/ rather than docs/, being deployable configuration rather than prose. It refuses /compute/*, which the README-based template did not: those endpoints take server-side file paths and run gemma/ravanan/R on them, so any token holder able to reach them can read the box -- the operator checklist in docs/www/ai-instruction.md already said to keep them on the internal listener, and this is that rule where it belongs. * etc/nginx-vesuvio.pu.ac.uk.conf: new file. TLS, http2, log format carrying x-request-id, / and /gn4 redirects, proxy_pass with the prefix-stripping trailing slash, raised timeouts, sub_filter rewriting of href/next/spec_url/type, and 403/404 refusals for /compute/ and /get-test-token. * docs/nginx.md: point at it, and say why /compute/ is refused. --- docs/nginx.md | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'docs') diff --git a/docs/nginx.md b/docs/nginx.md index 43658d3..cf59152 100644 --- a/docs/nginx.md +++ b/docs/nginx.md @@ -110,6 +110,15 @@ server { } ``` +For the `vesuvio.pu.ac.uk/gn4` deployment as configured, +[`etc/nginx-vesuvio.pu.ac.uk.conf`](../etc/nginx-vesuvio.pu.ac.uk.conf) is +the same thing as a complete, drop-in file -- TLS, log format, the `/gn4` +redirect, and the `/compute/` and `/get-test-token` refusals. Note that +it refuses `/compute/*`: those endpoints take server-side file paths, so +they belong on the internal listener only (see the operator checklist in +[`docs/www/ai-instruction.md`](www/ai-instruction.md)); drop the two +`location` lines only if every token holder may read the server's files. + `http2 on;` needs nginx >= 1.25.1; on older versions use `listen 443 ssl http2;`. The block above (minus the `ssl_*` lines and the TLS listener) is tested against nginx 1.28: `nginx -t` accepts it, and with -- cgit 1.4.1