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

GeoIP not resolving Countries – see screen shot (please help)

Reply to Post Add a New Topic
No Tags
UserPost

7:35 pm
June 20, 2015


rr3320

Member

posts 9

I have RHEL6.6 with AWSTATS-7.0-3.el6 current running. I am having issues getting GeoIP to work.
I do not know how to put a screen shot here but when I click the countries tab I see this
Organizations
Organizations: 0
Others/Unknown Hits 19,202,254 Percent 100%
Advanced Web Statistics 7.0 (build 1.971) – Created by awstats (plugins: geoip_org_maxmind, geoip_cit_maxmind, geoip)

You can see the screen shot here:
http://www.annapoliswebhosting.net/countries.bmp
 

7:46 pm
June 20, 2015


rr3320

Member

posts 9

I have the issue but unsure how to resolve,  my servers sit behind a Load Balancer and it does forward "Client-IP" to the logs but it looks like this, how can i configure AWSTATS to use the client ip

the ip in bold is the actual ip, the 10.140.28.174 is my Load Balancer

10.140.28.174 – - [03/Jun/2015:09:39:38 -0400] "GET /us.vwr.com/en_US/images/green_go.gif HTTP/1.1" 200 441 69.7.237.251

8:09 am
June 21, 2015


Jean-Luc

Admin

posts 1125

Hi,

How did you define LogFormat  in your AWStats config file ? Let us first make sure it is correct.

3:30 pm
June 21, 2015


rr3320

Member

posts 9

I used the default LogFormat=1

I left this commented

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

 

Here is what I have in Apache

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

3:59 pm
June 21, 2015


rr3320

Member

posts 9

Updated on log config apache

<IfModule log_config_module>
    #
    # The following directives define some format nicknames for use with
    # a CustomLog directive (see below).
    #
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined

#    LogFormat "%h %l %u %t \"%r\" %>s %b" common
 LogFormat "%h %l %u %t \"%r\" %>s %b %{X-Forwarded-For}i" common

    <IfModule logio_module>
      # You need to enable mod_logio.c to use %I and %O
      LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
    </IfModule>

4:39 pm
June 21, 2015


Jean-Luc

Admin

posts 1125

I would replace

LogFormat=1

by

LogFormat = "%other %other %logname %time1 %methodurl %code %bytesd %host"

 

This will tell AWStats to use the last field as address of the visitor.

4:39 pm
June 21, 2015


rr3320

Member

posts 9

I fixed it and have countries now

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

 LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b" common
 #LogFormat "%h %l %u %t \"%r\" %>s %b %{X-Forwarded-For}i" common

    <IfModule logio_module>
      # You need to enable mod_logio.c to use %I and %O
    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio

4:42 pm
June 21, 2015


Jean-Luc

Admin

posts 1125

I was suggesting to edit the AWStats format. Of course, your change of the Apache format is also a valid solution.

No Tags
Reply to Post

Reply to Topic:
GeoIP not resolving Countries – see screen shot (please help)

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:
6 + 5
   


About the InternetOfficer.com Forum

Forum Timezone: UTC 1

Most Users Ever Online: 302

Currently Online:
11 Guests

Currently Browsing this Topic:
1 Guest

Forum Stats:

Groups: 2
Forums: 9
Topics: 638
Posts: 2709

Membership:

There are 257 Members
There have been 302 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)