6

I've setup awstats to read cloudfront log files and I need to be able to generate reports for hits on specific files, which are images used for banners. I changed "NotPageList" options to exclude the image files and I deleted the awstats*.txt data files and ran a fresh -update but the jpg images are still not counted as pages. What do I need to do to get this working?

LogFile="/var/log/cloudfront-logs/mydomain.log"
LogFormat="%time2 %cluster %bytesd %host %method %virtualname %url %code %referer %ua %query"
LogSeparator="\t"
SiteDomain="d2fxxxxxx.cloudfront.net"
HostAliases="d2fxxxxxx.cloudfront.net"
NotPageList="css js class bmp ico rss xml swf"
DecodeUA=1
benzado
  • 82,288
  • 22
  • 110
  • 138
ColinM
  • 13,367
  • 3
  • 42
  • 49
  • 1
    For reference - I'm running 6.95-3.el5 (CentOS) - and the config above works for me. This is probably something new in 7 as indicated by @ColinM – plasmid87 May 18 '12 at 11:32
  • See https://sourceforge.net/p/awstats/discussion/43428/thread/cf2a6f05 for a bug description. – cweiske Nov 23 '14 at 20:03

1 Answers1

5

Looks like there is an additional criteria for a request to be a "page" determined by mime type in awstats which is not documented.. So, to fix this for my local install I hacked the code to remove this mime type test.

AWStats 7.0 build 1.971 awstats.pl line 18219

Before:

if ( $NotPageList{$extension} ||
($MimeHashLib{$extension}[1]) && $MimeHashLib{$extension}[1] ne 'p') { $PageBool = 0;}

After:

if ( $NotPageList{$extension} ) { $PageBool = 0;}
ColinM
  • 13,367
  • 3
  • 42
  • 49
  • 2
    I was just struggling with the similar issue and was wondering why the changing the NotPageList configuration setting wasn't doing anything. The added OR (||) clause basically negates the helpful config setting in this case. – toyNN Mar 24 '13 at 04:40