Skip to content

Instantly share code, notes, and snippets.

@iMilnb
Created December 27, 2013 13:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iMilnb/8146933 to your computer and use it in GitHub Desktop.
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
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