tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ben short" <...@benshort.co.uk>
Subject Re: Tomcat - Apache: IP replacement
Date Mon, 02 Jul 2007 10:47:34 GMT
I had an issue where getLocalAddr() would return 127.0.0.1 rather than
the ip address of my linux box. Altering the /etc/hosts file to
something like the following fixed that. I wonder what effect that
might have for your problem.

192.168.6.173           box box.domain.com
127.0.0.1              localhost

On 7/2/07, Rainer Jung <rainer.jung@kippdata.de> wrote:
> Something is wrong with your configuration or box setup.
> request.getRemoteAddr() works for me, it shows the Apache server address
> used by the request.
>
> Regards,
>
> Rainer
>
> Nino Ulsamer wrote:
> > Hello,
> >
> > I have a problem with finding out the IP address of requests in Tomcat.
> > I'm using the HttpServletRequest.getRemoteAddr() function, but it
> > returns "0.0.0.0". My server configuration is as follows: Apache
> > receives all requests and forwards them to Tomcat via mod_jk. Probably
> > in this step it replaces the address of the original request by its own
> > address. I've read a lot about this topic already, but I always found
> > the solution being "you should use mod_jk". I'm using JK 1.2, is it
> > possible to configure it so that it does not replace the IP address?
> >
> > Thanks a lot,
> >
> > Nino Ulsamer
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message