From 21f570962c69af4ffd6625f0c7cc84c7d17fce85 Mon Sep 17 00:00:00 2001 From: Moonchild Date: Thu, 24 Jul 2025 14:11:53 +0200 Subject: [PATCH] Pass forward X-Real-IP to nginx backend server (#901) The TLS termination server sets X-Real-IP to be used by the back-end, but the back-end configuration example doesn't actually extract it so nginx logs (and back-end processing) fails to log or use the visiting IP in any way (it just states `unix:` if using a unix socket like in the example given, or the local IP if forwarded over TCP). Adding real_ip_header to the config will fix this. Signed-off-by: Moonchild --- docs/docs/admin/environments/nginx.mdx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/docs/admin/environments/nginx.mdx b/docs/docs/admin/environments/nginx.mdx index 0d51d75..ec961cd 100644 --- a/docs/docs/admin/environments/nginx.mdx +++ b/docs/docs/admin/environments/nginx.mdx @@ -79,6 +79,10 @@ server { root "/srv/http/anubistest.techaro.lol"; index index.html; + # Get the visiting IP from the TLS termination server + set_real_ip_from unix:; + real_ip_header X-Real-IP; + # Your normal configuration can go here # location .php { fastcgi...} etc. }