I am trying to add the extra sections from here, http://www.internetofficer.com/awstats/hotlinking-pages/ http://www.internetofficer.com/awstats/hits-on-images/ So I added the extra code to /etc/awstats/awstats.mydomain.com.conf/ but it seems that file is regenerated every night, is there another .conf file I should be editing? Thanks
After much trial and error I finally got this working if anyone want's to do the same, just copy/paste the code below in to the bottom of /etc/awstats/awstats.conf and then wait until after midnight. If you only have one domain you can replace mydomain.com with yours, if more than one domain just leave as is, it just means it picks up hotlinking from the local server as well. Code: ExtraSectionName1="Hits on Images" ExtraSectionCodeFilter1="200 304" ExtraSectionCondition1="URL,\.(png|gif|jpe?g)$" ExtraSectionFirstColumnTitle1="Image" ExtraSectionFirstColumnValues1="URL,^(\/.*\.(png|gif|jpe?g))$" ExtraSectionFirstColumnFormat1="<A HREF='http://%s' TARGET='_blank'>%s</A>" ExtraSectionStatTypes1=HBL ExtraSectionAddSumRow1=1 MaxNbOfExtra1=100 MinHitExtra1=1 ExtraSectionName2="Hotlinking pages" ExtraSectionCodeFilter2="200 304" ExtraSectionCondition2="URL,\.jpeg$||URL,\.jpg$||URL,\.png$||URL,\.gif$" ExtraSectionFirstColumnTitle2="Referrer" ExtraSectionFirstColumnValues2="REFERER,^(?!http:\/\/mydomain.com)http:\/\/(.*)$" ExtraSectionFirstColumnFormat2="<A HREF='http://%s' TARGET='_blank'>%s</A>" ExtraSectionStatTypes2=HBL ExtraSectionAddSumRow2=1 MaxNbOfExtra2=100 MinHitExtra2=1