I have a tomcat server proxied by lighttpd 1.4. The problem is, that HttpServleTRequest.getRemoteAddr returns localhost (127.0.0.1). Is there any way to configure Tomcat (6.0.29) or lighttpd to rewrite th开发者_开发知识库e remote address to its original value. (lighttpd in this version does not have AJP protocol support). Or have I to write my own servlet filter and do it somehow manually from headers?
Thanks
Check for the header "X-Forwarded-For" in your tomcat app
See: http://redmine.lighttpd.net/wiki/1/Docs:ModProxy
http://redmine.lighttpd.net/wiki/1/Docs:ModExtForward
精彩评论