0

Does anyone know of a tool that will analyze an Apache access log and show the location of each client that accessed the site, ideally showing city, state and country on a map in the same way that Google Analytics does ?

I've looked at Webalizer and AWStats, but they only seem to go down to country level, they only show tables of data rather than maps, and they also seem to infer the country based on the domain name of the client rather than doing a location lookup on the IP address. For example, my Webalizer setup shows the country of a .com domain as just ".com", but it will show the country of a .co.uk domain as the UK.

gareth_bowles
  • 8,867
  • 9
  • 33
  • 42
  • I have written a tool which is available at GitHub: https://github.com/softhub-software-development/gip . When run on the command line, it simply prints the geo location of the IP address or domain name. Launched without paramters it runs as a server, which displays the IP's in the access.log on a map. – chris Dec 16 '21 at 13:54

5 Answers5

1

Although I haven't used it personally, Nihuo Web Log Analyzer seems to do what you're looking for.

There's also a 30-day free trial available.

EDIT: Oh, just realised it doesn't map the hits to a visual map...

Izzy
  • 8,214
  • 2
  • 30
  • 35
1

AWStats includes the needed plugin by default to get tables down to city and state, but you will need to buy access to that database from MaxMind. Getting a map out of that data would require some custom scripting it looks like though.

Brian De Smet
  • 1,139
  • 7
  • 10
  • MaxMind apparently also offers a free, though less accurate, city database (http://www.maxmind.com/app/geolitecity) I wonder if AWStats could be modified to use the databases found at http://ipinfodb.com/ip_database.php It appears that they are based on the MaxMind databases, so it's a possibility. – Michael Johnson Oct 31 '09 at 04:22
1

you could cut the ip address out and try this: http://ip2country.pauljonesdotuk.co.uk/webmaster

although it is still in alpha testing

Cheers, sprouty

  • Thanks - this is the kind of thing I'm after, although it would be nice if I could call it via an API with a list of addresses, rather than having to paste the addresses into a web page. – gareth_bowles Nov 06 '09 at 16:46
0

Gip at https://github.com/softhub-software-development/gip visualizes client accesses on an OpenStreetMap when run as a server process. Used as a command line utility, it prints geo-information on ip addresses.

chris
  • 101
0

Are you using the geolocation database with Webalizer? You can get it here. Or there's also Google Analytics.

RainyRat
  • 3,700
  • 1
  • 23
  • 29