I have Nginx server in front of a Tomcat server but I have a problem getting the real ip...
If I don't use SSL, then the real ip is set in both x-forwarded-from and x-real-ip but when I use SSL, those variables contain the ip address of the firewall in front of the Nginx server...
Is this just the way it is or is there something I can configure to fix this?
I am using the following config for proxy..:
proxy_redirect off;
proxy_pass http://appserver01_8070;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-By $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
Regards,
BTJ