How to get the real user ip address when using nginx as reverse proxy(from backend apache server)
September 14th, 2010
2 comments
To put an elephant into a fridge-three steps(which I think you already knew it):
Firstly(open the fridge):In nginx,add a line in /usr/local/nginx/conf/proxy.conf:
proxy_set_header X-Real-IP $remote_addr;
#Note:Add this just in proxy.conf,repetitive addition in nginx.conf location and server place will result your backend server log repetitive times.
Secondly(put the elephant in):In backend apache server,add the following lines in place VirtualHost or Server: Read more…
