From bf260b235de23eedce975ecce0f6c7e944b89636 Mon Sep 17 00:00:00 2001 From: Jocelyn Jaubert Date: Tue, 12 Nov 2024 21:33:20 +0100 Subject: [PATCH] Ajout remoteip pour apache/nginx sur VMs du cluster moji --- roles/common/templates/apache-remoteip.conf | 3 +++ roles/common/templates/nginx-forwarded_ip.conf | 3 +++ 2 files changed, 6 insertions(+) diff --git a/roles/common/templates/apache-remoteip.conf b/roles/common/templates/apache-remoteip.conf index 8b06b928..eba7a672 100644 --- a/roles/common/templates/apache-remoteip.conf +++ b/roles/common/templates/apache-remoteip.conf @@ -14,6 +14,9 @@ {% elif vm_host in ["osm32.openstreetmap.fr", "osm33.openstreetmap.fr", "osm34.openstreetmap.fr"] %} RemoteIPInternalProxy 10.1.0.103 RemoteIPHeader X-Forwarded-For +{% elif vm_host in ["osm38.openstreetmap.fr", "osm39.openstreetmap.fr", "osm40.openstreetmap.fr", "osm41.openstreetmap.fr", "osm42.openstreetmap.fr", "osm43.openstreetmap.fr", "osm44.openstreetmap.fr"] %} + RemoteIPInternalProxy 10.1.0.100 + RemoteIPHeader X-Forwarded-For {% endif %} {% endif %} diff --git a/roles/common/templates/nginx-forwarded_ip.conf b/roles/common/templates/nginx-forwarded_ip.conf index c81e46e6..204f12f8 100644 --- a/roles/common/templates/nginx-forwarded_ip.conf +++ b/roles/common/templates/nginx-forwarded_ip.conf @@ -12,5 +12,8 @@ real_ip_header X-Forwarded-For; {% elif vm_host in ["osm32.openstreetmap.fr", "osm33.openstreetmap.fr", "osm34.openstreetmap.fr"] %} set_real_ip_from 10.1.0.103; real_ip_header X-Forwarded-For; +{% elif vm_host in ["osm38.openstreetmap.fr", "osm39.openstreetmap.fr", "osm40.openstreetmap.fr", "osm41.openstreetmap.fr", "osm42.openstreetmap.fr", "osm43.openstreetmap.fr", "osm44.openstreetmap.fr"] %} +set_real_ip_from 10.1.0.100; +real_ip_header X-Forwarded-For; {% endif %} {% endif %}