From 0f78f4cebcc4bfac4b2c9eab3a6f711490b57b41 Mon Sep 17 00:00:00 2001 From: paspo Date: Thu, 31 Jul 2025 17:29:31 +0200 Subject: [PATCH] use real IPs instead of docker ones (PHP 7.4) --- rootfs-php74/etc/nginx/nginx.conf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rootfs-php74/etc/nginx/nginx.conf b/rootfs-php74/etc/nginx/nginx.conf index fa160ec..b32e95e 100644 --- a/rootfs-php74/etc/nginx/nginx.conf +++ b/rootfs-php74/etc/nginx/nginx.conf @@ -89,6 +89,10 @@ http { '' close; } + # use real IPs instead of docker ones + set_real_ip_from 172.18.0.0/16; + real_ip_header X-Forwarded-For; + real_ip_recursive on; # Specifies the main log format. log_format main '$remote_addr - $remote_user [$time_local] "$request" '