Determine remote_addr when using the Glassfish loadbalancer plugin


When using the glassfish loadbalancer plugin for apache, you might want to use the client ip address on the back-end servers. Normally , when using ProxyPass, the default “X-Forwarded-For” environment variable can be used. But when using the glassfish loadbalancer plugin , this entry is empty. Instead you can use the “proxy-ip” to determine the remote_addr of your connecting clients.


request.getHeader("proxy-ip")