开发者

Lighttpd - tomcat - reverse proxy - remote address

开发者 https://www.devze.com 2023-03-13 15:07 出处:网络
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 rewrit

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

0

精彩评论

暂无评论...
验证码 换一张
取 消