LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-08-2013, 03:46 AM   #1
deepakdeore2004
LQ Newbie
 
Registered: Apr 2010
Posts: 26

Rep: Reputation: 0
Question AWStats log format for tomcat access logs which has X-Forwarded-For


Hi,

What should be the AWStats log format for below tomcat access logs ?

The default log format 4 mentioned in awstat is taking the internal ip address from X-Forwarded-For which should take the external ip.

If I try these formats but the IP addresses are missing AWStats reports.

LogFormat="%host %other %logname %time1 %methodurl %code %bytesd %refererquot
quot %referer %other %other"

LogFormat="%other %other %logname %time1 %methodurl %code %bytesd %refererquot
quot %host_proxy"

tomcat valve settings in server.xml:
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"

tomcat access 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

Last edited by deepakdeore2004; 11-08-2013 at 03:47 AM.
 
  


Reply

Tags
awstats, tomcat



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Tomcat log file in date format imoncloud Linux - General 1 09-16-2011 12:00 PM
Not able to see all the logs forwarded to Linux Box guggilamsandeep Linux - Server 1 04-19-2011 09:21 AM
In Apache server, How to change log file location and log format for access log fil? since1993 Linux - Server 1 08-19-2009 04:14 PM
awstats log format problem sang_froid Linux - Software 1 07-10-2007 08:12 PM
import logs in AWSTATS?! overlord73 Linux - Software 1 11-04-2005 11:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration