httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alan" <aiyuan...@ddmap.com>
Subject [users@httpd] request.getRemoteAddr() return null
Date Thu, 27 Sep 2007 01:51:51 GMT
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="+request.getHeader("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 ? 


Mime
View raw message