You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Mohit Anchlia <mo...@gmail.com> on 2010/10/19 21:17:25 UTC

Logging hostname/virutal name in the log

Currently we use proxy and x-forwarded. Proxy uses snat so when it
gets logged we see something like:

10.128.1.5 65.204.229.11 - - [14/Oct/2010:22:29:49 -0700] POST
/adi.cgi HTTP/1.1 200 753


10.128.1.5 is proxy's ip
65.204.229.11 is browser client ip


I also need the name of the hostname or virtual name. For eg:
http://abc.com/adi.cgi. So is it possible to also log abc.com?

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


Re: Logging hostname/virutal name in the log

Posted by Konstantin Kolinko <kn...@gmail.com>.
2010/10/19 Mohit Anchlia <mo...@gmail.com>:
> Currently we use proxy and x-forwarded. Proxy uses snat so when it
> gets logged we see something like:
>
> 10.128.1.5 65.204.229.11 - - [14/Oct/2010:22:29:49 -0700] POST
> /adi.cgi HTTP/1.1 200 753
>
>
> 10.128.1.5 is proxy's ip
> 65.204.229.11 is browser client ip
>
>
> I also need the name of the hostname or virtual name. For eg:
> http://abc.com/adi.cgi. So is it possible to also log abc.com?
>

%{Host}i  ?

http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/catalina/valves/AccessLogValve.html

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