I need nginx to redirect requests without proxying. I have this nginx.config file:
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
upstream web_rack {
server ip_address_1;
server ip_address_2;
server ip_address_3;
server ip_address_4;
}
server{
listen 80;
location / {
proxy_pass http://web_rack;
rewrite ^ http://<variable>$request_uri permanent;
}
}
}
How can I get server's IP-address who took the redirected request from nginx. I guess there exist some "variable" which stores this IP address but I don't know how to get it.