Skip to content

Commit

Permalink
Ajout remoteip pour apache/nginx sur VMs du cluster moji
Browse files Browse the repository at this point in the history
  • Loading branch information
jocelynj committed Nov 12, 2024
1 parent d788c07 commit bf260b2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions roles/common/templates/apache-remoteip.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
</IfModule>
3 changes: 3 additions & 0 deletions roles/common/templates/nginx-forwarded_ip.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}

0 comments on commit bf260b2

Please sign in to comment.