Created
December 27, 2013 13:30
-
-
Save iMilnb/8146933 to your computer and use it in GitHub Desktop.
configuration nginx pour réecrire les requètes de la neufbox vers l'infra neuf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 89; # le traffic de la neufbox est capturé puis renvoyé vers le port 89 via pf | |
server_name foobar *.neufbox.neuf.fr; | |
access_log /var/log/nginx/neufbox.access.log; | |
error_log /var/log/nginx/neufbox.error.log; | |
resolver 127.0.0.1; | |
location / { | |
if ($args ~ "^ip_data=[^&]*&ip_voip=[^&]*&ip_tv=[^&]*&(.*)$") { | |
set $others $1; | |
set $nip "ip.publique.neuf"; # a modifier ! | |
rewrite /(.*) /$1?ip_data=$nip&ip_voip=$nip&ip_tv=$nip&$others? break; | |
} | |
proxy_redirect off; | |
proxy_pass http://$host; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment