Customize AWStats Downloads

妖精的绣舞 提交于 2020-01-06 02:13:07

问题


This seems ridiculous to me, but AWStats is not configured to count exe or dmg files as downloads. What config file or setting can I change? I tried looking through the documentation but found no mention of anything pertaining to Downloads.

I did find out to add another download section containing my file types here http://antezeta.com/news/awstats, but neither the hits or bandwidth calculations are even close to being correct.


回答1:


Add an extra section to the end of the awstats.config file. The following example counts *.dmg files:

ExtraSectionName1="Disk Image Downloads" 
ExtraSectionCodeFilter1="200 304" 
ExtraSectionCondition1="URL,\.dmg" 
ExtraSectionFirstColumnTitle1="File" 
ExtraSectionFirstColumnValues1="URL,(.*)"
ExtraSectionFirstColumnFormat1="%s"
ExtraSectionStatTypes1=HB
ExtraSectionAddAverageRow1=0
ExtraSectionAddSumRow1=1
MaxNbOfExtra1=100
MinHitExtra1=1

Bandwidth counted is unlikely to match file size times download count. Many downloads will not complete or will be interrupted.



来源:https://stackoverflow.com/questions/17702538/customize-awstats-downloads

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!