Current User: Guest Login
Please consider registering


Lost Your Password?

Search Forums:


 






Minimum search word length is 4 characters – Maximum search word length is 84 characters
Wildcard Usage:
*  matches any number of characters    %  matches exactly one character

problem with %{X-Forwarded-For}i log analyze

Reply to Post Add a New Topic
UserPost

3:39 am
July 13, 2009


unstable

Member

posts 3

hi

i set awstats 6.9 on my centos box, everything work fine.

but i find many recorde like this:

10.126.195.114, 218.207.218.135 – - [09/Jul/2009:00:00:58 +0800] “GET /comic/images/splogo/1244779732836.gif HTTP/1.1″ 200 1525 “-” “-”
10.126.195.114, 218.207.218.135 – - [09/Jul/2009:00:01:01 +0800] “GET /wapbbmf/images/gif-0086.gif HTTP/1.1″ 200 78 “-” “-”
10.126.195.114, 218.207.218.135 – - [09/Jul/2009:00:01:03 +0800] “GET /wapbbmf/images/home_05.gif HTTP/1.1″ 200 948 “-” “-”
10.126.195.114, 218.207.218.135 – - [09/Jul/2009:00:01:07 +0800] “GET /comic/images/titleImg/1244108920259.gif HTTP/1.1″ 200 450 “-” “-”
10.126.195.114, 218.207.218.135 – - [09/Jul/2009:00:01:10 +0800] “GET /comic/images/titleImg/1244108550585.gif HTTP/1.1″ 200 414 “-” “-”
10.126.195.114, 218.207.218.135 – - [09/Jul/2009:00:01:12 +0800] “GET /comic/images/titleImg/1244108772817.gif HTTP/1.1″ 200 445 “-” “-”
10.126.195.114, 218.207.218.135 – - [09/Jul/2009:00:01:16 +0800] “GET /comic/images/titleImg/1243826188535.gif HTTP/1.1″ 200 1502 “-” “-”

awstats only analyze fist ip,but this is not real ip i think, i need analyze last ip, any one help me?

apache log format:

LogFormat “%{X-Forwarded-For}i %l %u %t \\”%r\\” %>s %b \\”%{Referer}i\\” \\”%{User-Agent}i\\”" combined

TIA

ps: sorry my poor english:(

5:33 am
July 13, 2009


Jean-Luc

Admin

posts 1125

Hi,

We got this question already. Have a look at Apache LogFormat containing %{X-Forwarded-For}i. The solution is in the last post.

9:03 am
July 13, 2009


unstable

Member

posts 3

thank you reply

i already read this port and change awstats.pl but not work, any good idea?

elsif ( $f =~ /%host_proxy$/ )
{ # if host_proxy tag used, host tag must not be used
$pos_host = $i;
$i++;
push @fieldlib, 'host';
$PerlParsingFormat .= "(?:(?:(?:\\\\d+\\\\.\\\\d+\\\\.\\\\d+\\\\.\\\\d+),\\\\s)*(\\\\d+\\\\.\\\\d+\\\\.\\\\d+\\\\.\\\\d+))";
}

1:19 pm
July 13, 2009


Jean-Luc

Admin

posts 1125

As LogFormat  definition in the AWStats config file, I suggest this :

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

I hope it helps.

9:25 pm
July 13, 2009


unstable

Member

posts 3

thank u, it works nowLaugh

7:16 am
November 10, 2013


deepak

Guest

What should be the awstat LogFormat for these tomcat access logs ?

 

valve setting 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" 

Reply to Post

Reply to Topic:
problem with %{X-Forwarded-For}i log analyze

Guest Name (Required):

Guest Email (Required):

NOTE: New Posts are subject to administrator approval before being displayed

Smileys
Confused Cool Cry Embarassed Frown Kiss Laugh Smile Surprised Wink Yell
Post New Reply

Guest URL (required)

Math Required!
What is the sum of:
12 + 3
   


About the InternetOfficer.com Forum

Forum Timezone: UTC 1

Most Users Ever Online: 302

Currently Online:
14 Guests

Currently Browsing this Topic:
1 Guest

Forum Stats:

Groups: 2
Forums: 9
Topics: 639
Posts: 2710

Membership:

There are 257 Members
There have been 304 Guests

There is 1 Admin
There is 1 Moderator

Top Posters:

cssfsu – 55
deepakgupta – 34
albert_newton – 30
cosminpana – 20
DTNMike – 19
ahtshun83 – 17

Recent New Members: raju, todd2taylor, sbdcunha, mansigill1987, ThomasDuh, ThomasKic

Administrators: Jean-Luc (1125 Posts)

Moderators: Jean-Luc (1125 Posts)