Things you didn't know about Awstats

Thursday, 07 March, Year 11 d.Tr. | Author: Mircea Popescu

Awstats is the definitive Apache log "processor" (they mean -- summarizeri) in the LAMPii world, by simple lack of competitioniii. I don't know whether everyone uses it, but I do know it is powerful and flexible enough to be pretty much universally useful.

But did you know it has a config file ? Something like

/home/?user?/tmp/awstats/awstats.?tld?.conf

depending on your installation ? Ever read that thing ?

Let's read from mine together.

# Use SkipFiles to ignore access to URLs that match one of following entries.
# You can, with this option, add a list of not important frame pages (like
# menus, etc...) to exclude them from statistics.
# For example, to ignore a whole directory tree, just add "directorytoignore",
# to ignore "users" pages in your stats, you can add "/~".
# The oposite parameter of "SkipFiles" is "OnlyFiles".
# Note: This parameter is not case sensitive.
# Note: Use space between each value and do not remove default values.
# Note: xxx$ means URL ending with xxx.
# Example: "robots.txt$ favicon.ico$ badpage.html /~"
# Default: "robots.txt$ favicon.ico$"
#
SkipFiles="robots.txt$ favicon.ico$ /xmlrpc.php REGEX[\/feed]"

Yup, that works, and it takes out exactly the sorta thing you don't care to see.

There's a lot more stuff in thereiv, including some remarkably quaint stack-state-machinesv harking back to what ~everything looked like in the late 90s. Altogether, there's worse ways to spend ten minutes, especially if you're running a web interface.

———
  1. Making summaries is an important activity at any court, and a key pillar in maintaining the coupling between a lord and the world. []
  2. Linux, Apache, Mysqy, Php. Remember that ?

    For the noobs : back when "free & open source" needed a killer app, to enact itself past the various "experts" and assorted morons, this was it []

  3. Check them out, sometimes Republic-style communication happens for the heathens, too! By sheer accident, of course, but then what can you ask for. They are heathens for a reason after all. []
  4. Take say

    # Put here all other possible domain names, addresses or virtual host aliases
    # someone can use to access your site.

    Ever needed that ? []

  5. People, by which we mean commoners, the sad sort who were never educated on the topic, tend to do ridiculous things such as implementing a complicated multi-step, unintentional "overwrite X" "oh wait, maybe you didn't want it over-written, save a copy here" sorta lulz. Like so :

    # AWStats can purge log after processing it. By this way, the next time you
    # launch AWStats, log file will be smaller and processing time will be better.
    # IMPORTANT !!!
    # AWStats is able to detect new lines in log file, to process only them, so
    # you can launch AWStats as soon as you want, even with this parameter to 0.
    # With 0, no purge is made, so you must use a scheduled task or a web server
    # that make this purge frequently.
    # With 1, the purge of the log file is made each time AWStats is ran.
    # This parameter doesn't work with IIS (This web server doesn't let its log
    # file to be purged).
    # Possible values: 1 or 0
    # Default: 0
    #
    PurgeLogFile=0

    # When PurgeLogFile is setup to 1, AWStats will clean your log file after
    # processing it. You can however keep an archive file (saved in "DirData") of
    # all processed log records by setting this to 1 (For example if you want to
    # use another log analyzer).
    # This parameter is not used if PurgeLogFile=0
    # Possible values: 1 or 0
    # Default: 0
    #
    ArchiveLogRecords=0

    # Each time you run the update process, AWStats overwrite the 'historic file'
    # for the month (awstatsMMYYYY[.*].txt) with the updated one.
    # When write errors occurs (IO, disk full,...), this historic file can be
    # corrupted and must be deleted. Because this file contains information of all
    # past processed log files, you will loose old stats if removed. So you can
    # ask AWStats to save last non corrupted file in a .bak file. This file is
    # stored in "DirData" directory with other 'historic files'.
    # Possible values: 1 or 0
    # Default: 1
    #
    KeepBackupOfHistoricFiles=1

    Confucius sez : do not abuse the stack to implement CPU emulation in it! []

Category: Meta psihoza
Comments feed : RSS 2.0. Leave your own comment below, or send a trackback.

One Response

  1. [...] article body. .../feed/comments serving feed of most recent accepted comments. ...awstats as per discussion. ...force missing pingbacks tool, as described. ———One-click shortcut to [...]

Add your cents! »
    If this is your first comment, it will wait to be approved. This usually takes a few hours. Subsequent comments are not delayed.