AWStats log format for tomcat access logs which has X-Forwarded-For
Posted
by
Nix
on Server Fault
See other posts from Server Fault
or by Nix
Published on 2013-11-07T12:50:09Z
Indexed on
2013/11/07
15:58 UTC
Read the original article
Hit count: 269
awstats
What should be the AWStats log format for below tomcat access logs ?
I tried these formats but the external IP addresses are not coming into AWStats reports.
LogFormat="%host %other %logname %time1 %methodurl %code %bytesd %refererquot %uaquot %referer %other %other"
LogFormat="%other %other %logname %time1 %methodurl %code %bytesd %refererquot %uaquot %host_proxy"
tomcat valve settings:
pattern="%h %l %{USER_ID}s %t "%r" %s %b "%{Referer}i" "%{User-Agent}i" "X-Forwarded-For=%{X-Forwarded-For}i" "JSESSIONID=%{JSESSIONID}c" %D"
Log entry:
127.0.0.1 - - [04/Nov/2013:13:39:55 +0000] "GET / HTTP/1.1" 200 12345 "https://www.google.com/url?some_url" "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.101 Safari/537.36" "X-Forwarded-For=real_ip, proxy_server_internal_ip" "JSESSIONID=-" 12345
© Server Fault or respective owner