Dear all, Now I’ve got a problem : two
apache server(server1,and server2) and one tomcat server, both of the
apache server connet tomcat server with the same configuration(httpd.conf) ,
and connected by ProxyPass But the problem is when I visit
tomcat by apache server1, I can use request.getRemoteAddr() to get client Ip ,
but when I visit tomcat by apache server2 , request.getRemoteAddr() return
null, I just don’t know how could it
happened! And I have also tried : <% out.print("<br>getRemoteAddr="+request.getRemoteAddr()); out.print("<br>getRemoteHost="+request.getRemoteHost()); out.print("<br>Proxy-Client-IP="+request.getHeader("Proxy-Client-IP")); out.print("<br>WL-Proxy-Client-IP="+request.getHeader("WL-Proxy-Client-IP")); out.print("<br>X-Forwarded-For=""> out.print("<br>X-Forwarded-Host="+request.getHeader("X-Forwarded-Hos")); out.print("<br>X-Forwarded-Server="+request.getHeader("X-Forwarded-Server")); %> All of them return null by visit server2, So where might the problem be ? |