location /data { if ($kit_client) { return 301 http://ipepdvarchive.ipe.kit.edu$request_uri; } return 301 http://$host/remote$request_uri; } location /remote/data { proxy_pass http://192.168.26.170/data; }