Awstats extra sections

Discussion in 'General' started by HenrysCat, Nov 3, 2019.

  1. HenrysCat

    HenrysCat Member

  2. HenrysCat

    HenrysCat Member

    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
     
    till likes this.

Share This Page