I�m using apache as a proxy in port 80, so when it receives a request it forward the request to Jboss in the same machine. I have a servlet that gets the request sender IP address, but instead of geting the real IP adrress it gets the local valid address 200.212.90.xxx (my apache/Jboss server). In my action I use the method request.getRemoteAddr(). I also try to use request.getHeader(headerName) and I found some thing very intresting:
As you can see the request does not have the REMOTE_HOST or HTTP_X_FORWARDED_FOR, it only lists those fell headers. But if I use request.getRemoteAddr() it returns the local valid IP address and not the real request sender IP address. Why my lopp did�t list all the http headers, including REMOTE_HOST??? So the question is:
Is there a configuration at Apache so when it act as a proxy my action can get the real request sender IP address? Or Can I use another method or way to get the user IP address?