Hi, I've installed nginx as a reverse proxy with 2 backends web servers (one nginx, one apache). I want the backends servers to have the "real" IP of the client on their logs and on the webpage. I tried proxy_set_header like here : https://help.ubuntu.com/community/Nginx/ReverseProxy and apache with the rpaf module but it doesn't work... Hope you'll have some advices. I just want the backends server to display the client IP not like right now, have a look : http://wiki.okira.net/w/Accueil it display the reverse proxy IP (127.0.0.1 or 87.106.165.190). Regards.
on 2012-08-08 23:52
on 2012-08-09 01:19
On Wed, Aug 08, 2012 at 11:51:20PM +0200, Bertrand Caplet wrote: Hi there, > Hi, I've installed nginx as a reverse proxy with 2 backends web servers > (one nginx, one apache). I want the backends servers to have the "real" > IP of the client on their logs and on the webpage. The backend servers will always see the tcp connection coming from the nginx reverse proxy. All nginx can do is send an extra http header which says what the ip address of the client connecting to it was. The backend server can then choose to do something special with that header, or not. > I tried > proxy_set_header like here : > https://help.ubuntu.com/community/Nginx/ReverseProxy and apache with the > rpaf module but it doesn't work... Look at the traffic from nginx to the backend server. If you see X-Real-IP: and the client address, your nginx configuration is correct. If not, it isn't. If your nginx configuration is not correct, provide details. If it is correct, you have a non-nginx problem to address. Good luck with it, f -- Francis Daly francis@daoine.org
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.
