request.getRemoteAddr() return null

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear all,

Now Ive 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 dont 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 ?


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux