User Post
4:16 pm January 7, 2010
Drew Wrobel
Guest
I took the code from Hits on Images and modified it to get the hits on various HTML files.
I get a new section ‘Hits on HTML’, I am not getting any results listed.
The normal awstats listing under 'File types' does show stats for the various html files that I'm checking for.
Here is the code that I have defined:
ExtraSectionName7="Hits on HTML (Top 10)" ExtraSectionCodeFilter7="200 304″ ExtraSectionCondition7="URL,.(asp|jsp|cgi|pl|aspx|cfm|shtml|sh|asmx|htm|html|xml)$" ExtraSectionFirstColumnTitle7="HTML/Script File" ExtraSectionFirstColumnValues7="URL,^(.*)$" ExtraSectionFirstColumnFormat7="<A HREF='%s' TARGET='_blank'>%s</A>" ExtraSectionStatTypes7=HBL ExtraSectionAddSumRow7=1 MaxNbOfExtra7=10 MinHitExtra7=1
Here is a copy of a URL from the squid access log:
http ://www.pepboys.com 65.55.207.102 – - [30/Nov/2009:10:25:57 -0500] "GET ht tp://172.21.100.66/about/faq.html HTTP /1.1″ 301 563 "-" "msnbot/2.0b (+http: //search.msn.com/msnbot.htm)" TCP_MISS :ROUNDROBIN_PARENT
9:14 pm January 7, 2010
Jean-Luc
Admin
posts 1042
I don't see any error in your extra section.
Note that the new extra section appears iin the report as soon as you add it to the AWStats config file, but there will be no data until the next AWStats data update.
2:59 pm January 8, 2010
Drew Wrobel
Guest
I was hoping that I missed something.
Yeah, I learned the hard way with making changed to the awstats configuration and having to wait until the next update.
I have gone through a couple of updates and I'm still not getting any stats in the new section.
Any ideas/suggestions for what I can do to see why the extra rule isn't picking up html while the normal awstats is listing hits under the File type section?
3:51 pm January 8, 2010
Jean-Luc
Admin
posts 1042
I just noticed that, in your post above, there is a right double quote at the end of the second line. It should be a double quotation mark :
ExtraSectionCodeFilter7="200 304"
Not sure that this is related to your problem though.
5:34 pm January 8, 2010
Drew Wrobel
Guest
I checked my configuration file and a double quotation mark.
Not sure what happened that it didn't post to the forum correctly.
I'm doing to make a copy of my configuration, and take out all the extra sections but this one.
See if I get any different results.
8:14 pm January 12, 2010
Drew Wrobel
Guest
I ran a report with awstats and debug set to 10.
It turns out the reason why I'm not getting any hits in my report is that the URLs' have a http code of 404 or 301.
I guess the File type section only lists the filetypes, regardless of their HTTP return code.
Should I leave the CodeFilter option to 200 and 304 or should I include 404, 301 and 302 as well?
9:12 pm January 12, 2010
Jean-Luc
Admin
posts 1042
The ValidHTTPCodes directive applies to all sections but the extra sections. Its default value is :
ValidHTTPCodes="200 304"
Does ValidHTTPCodes have another value in your config file ? If yes, you need to change ExtraSectionCodeFilter7 accordingly.
4:26 pm January 13, 2010
Drew Wrobel
Guest
I checked ValidHTTPCodes and the directive is set at the default value.
Was hoping to get an idea of what HTML files were being hit that are generating the bandwidth, but if they are from 301, 302 and 404, not sure that will by me anything.