Welcome! Log In Create A New Profile

Advanced

client ip address using proxy_pass and issues

kevin
March 28, 2010 09:56PM
i am trying to move from nginx->fastcgi to nginx->apache->fastcgi

this how i have configured proxy_pass to my apache running on 2080.
my app gets the client ip address as 127.0.0.1. how to make it see the
correct real ip address.

location / {
root /home/live/work/apps;
proxy_pass http://127.0.0.1:2080/$host$request_uri;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_set_header IP_GEO $geo;
}

i get the server address as this 'SERVER_ADDR': '127.0.0.1', how to fix
this?


the IP_GEO header gets converted to HTTP_IP_GEO, is there anyway to avoid
this as my python app uses IP_GEO everywhere.

thanks a lot!
_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

client ip address using proxy_pass and issues

kevin March 28, 2010 09:56PM

Re: client ip address using proxy_pass and issues

Maxim Dounin March 29, 2010 12:56AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 291
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready