Re: ServletRequest.getRemoteHost() not working when Tomcat is behind Nginx (Nginx as a reverse proxy)

2015-09-09 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Brian, On 9/8/15 5:16 PM, Brian wrote: > mm.. ... Well, so far I have always assumed that Tomcat > itself has always made this effort (assuming that it is enabled to > do so in the connector), so that when I execute the method I'm just >

Re: ServletRequest.getRemoteHost() not working when Tomcat is behind Nginx (Nginx as a reverse proxy)

2015-09-08 Thread Jose María Zaragoza
2015-09-08 21:22 GMT+02:00 Brian : > Hi, > > > > First of all, I'm using: > > - Tomcat 7.0.50 > > - Nginx 1.4.7 > > > > When I use Tomcat alone, ServletRequest.getRemoteHost() > (http://docs.oracle.com/javaee/6/api/javax/servlet/ServletRequest.html#getRe > moteHost() >

RE: ServletRequest.getRemoteHost() not working when Tomcat is behind Nginx (Nginx as a reverse proxy)

2015-09-08 Thread Brian
Hello José, That’s a nice idea indeed (A VERY NICE ONE!), but an extra work because of the networking effort. I'm talking about a site that can get hundreds of requests per second. Since Nginx has access to this information, I bet there must be a way to pass it to Tomcat the same way the IP

Re: ServletRequest.getRemoteHost() not working when Tomcat is behind Nginx (Nginx as a reverse proxy)

2015-09-08 Thread Jose María Zaragoza
2015-09-08 22:10 GMT+02:00 Brian : > Hello José, > > That’s a nice idea indeed (A VERY NICE ONE!), but an extra work because of > the networking effort. I'm talking about a site that can get hundreds of > requests per second. But you would want to execute

RE: ServletRequest.getRemoteHost() not working when Tomcat is behind Nginx (Nginx as a reverse proxy)

2015-09-08 Thread Brian
mm.. ... Well, so far I have always assumed that Tomcat itself has always made this effort (assuming that it is enabled to do so in the connector), so that when I execute the method I'm just retrieving the value. I'm I wrong? In this case when using Nginx+Tomcat, I assume that Nginx