<?xml version="1.0" encoding="UTF-8"?> <rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" ><channel><title>Alunduil&#039;s Hosting &#187; awstats</title> <atom:link href="http://www.alunduil.com/tag/awstats/feed/" rel="self" type="application/rss+xml" /><link>http://www.alunduil.com</link> <description>Gentoo Hackery and Other Fun ...</description> <lastBuildDate>Fri, 13 Aug 2010 17:25:11 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.0.1</generator> <item><title>Running awstats on Gentoo</title><link>http://www.alunduil.com/2010/03/02/running-awstats-on-gentoo/</link> <comments>http://www.alunduil.com/2010/03/02/running-awstats-on-gentoo/#comments</comments> <pubDate>Tue, 02 Mar 2010 16:31:40 +0000</pubDate> <dc:creator>Alex Brandt</dc:creator> <category><![CDATA[Linux Guides]]></category> <category><![CDATA[apache]]></category> <category><![CDATA[awstats]]></category> <category><![CDATA[gentoo]]></category> <category><![CDATA[statistics]]></category> <category><![CDATA[web]]></category><guid isPermaLink="false">http://www.alunduil.com/?p=102</guid> <description><![CDATA[Requirements I&#8217;m assuming for this quick guide that you already have a website installed and consequently apache. emerge -av awstats A quick breakdown on the use flags from gentookit&#8217;s equery: apache2 : Add Apache2 support geoip : Add geoip support for country and city lookup based on IPs vhosts : Adds support for installing web-based [...]]]></description> <content:encoded><![CDATA[<h1>Requirements</h1><p>I&#8217;m assuming for this quick guide that you already have a website installed and consequently apache.</p><pre><code>emerge -av awstats
</code></pre><p>A quick breakdown on the use flags from gentookit&#8217;s equery:</p><ul><li>apache2 : Add Apache2 support</li><li>geoip   : Add geoip support for country and city lookup based on IPs</li><li>vhosts  : Adds support for installing web-based applications into a virtual-hosting environment</li></ul><h1>Configuration</h1><p>Lots of configuration needs to occur for awstats to work correctly:</p><p>First, we need to setup a configuration file for the web site so we can update the statistics. cp /etc/awstats/awstats.model.conf /etc/awstats/awstats.<fqdn>.conf</fqdn></p><p>Where fqdn is the fully qualified domain name of your website you&#8217;ll be monitoriing.  After you&#8217;ve copied the default configuration customize it for your particular website.</p><p>Second, you need to enable awstats in your apache vhost configuration:</p><pre><code>CustomLog /var/www/localhost/log/apache/production.log combined

Alias /awstats/classes "/usr/share/webapps/awstats/6.9-r1/htdocs/classes/"
Alias /awstats/css "/usr/share/webapps/awstats/6.9-r1/htdocs/css/"
Alias /awstats/icons "/usr/share/webapps/awstats/6.9-r1/htdocs/icon/"
ScriptAlias /awstats/ "/usr/share/webapps/awstats/6.9-r1/hostroot/cgi-bin/"
ScriptAlias /awstats "/usr/share/webapps/awstats/6.9-r1/hostroot/cgi-bin/awstats.pl"
ScriptAlias /awstats.pl "/usr/share/webapps/awstats/6.9-r1/hostroot/cgi-bin/awstats.pl"

&lt;Directory "/usr/share/webapps/awstats/6.9-r1/htdocs"&gt;
   Options None
   AllowOverride None
   &lt;IfModule mod_access.c&gt;
       Order allow,deny
       Allow from all
   &lt;/IfModule&gt;
&lt;/Directory&gt;

&lt;Directory "/usr/share/webapps/awstats/6.9-r1/hostroot/cgi-bin"&gt;
    Options ExecCGI
    AllowOverride None
    &lt;IfModule mod_access.c&gt;
        Order allow,deny
        Allow from all
    &lt;/IfModule&gt;
&lt;/Directory&gt;

&lt;Directory "/usr/share/webapps/awstats/6.9-r1/hostroot"&gt;
    Options None
    AllowOverride None
    Order allow,deny
    Allow from all
&lt;/Directory&gt;

&lt;Directory "/usr/share/webapps/awstats/6.9-r1/htdocs/icon"&gt;
    Options None
    AllowOverride None
    Order allow,deny
    Allow from all
&lt;/Directory&gt;
</code></pre><p>And verify the logging output in /etc/apache2/modules.d/00_mod_log_config.conf:</p><pre><code>&lt;IfModule log_config_module&gt;
    # The following directives define some format nicknames for use with
    # a CustomLog directive (see below).
    LogFormat "%h %l %u %t \"%r\" %&gt;s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
    LogFormat "%h %l %u %t \"%r\" %&gt;s %b" common

    LogFormat "%{Referer}i -&gt; %U" referer
    LogFormat "%{User-Agent}i" agent
    LogFormat "%v %h %l %u %t \"%r\" %&gt;s %b %T" script
    LogFormat "%v %h %l %u %t \"%r\" %&gt;s %b \"%{Referer}i\" \"%{User-Agent}i\" VLOG=%{VLOG}e" vhost

    &lt;IfModule logio_module&gt;
        # You need to enable mod_logio.c to use %I and %O
        LogFormat "%h %l %u %t \"%r\" %&gt;s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
        LogFormat "%v %h %l %u %t \"%r\" %&gt;s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" vhostio
    &lt;/IfModule&gt;

    # The location and format of the access logfile (Common Logfile Format).
    # If you do not define any access logfiles within a &lt;VirtualHost&gt;
    # container, they will be logged here.  Contrariwise, if you *do*
    # define per-&lt;VirtualHost&gt; access logfiles, transactions will be
    # logged therein and *not* in this file.
    CustomLog /var/log/apache2/access_log common

    # If you would like to have agent and referer logfiles,
    # uncomment the following directives.
    #CustomLog /var/log/apache2/referer_log referer
    #CustomLog /var/log/apache2/agent_logs agent

    # If you prefer a logfile with access, agent, and referer information
    # (Combined Logfile Format) you can use the following directive.
    #CustomLog /var/log/apache2/access_log combined
&lt;/IfModule&gt;
</code></pre><p>And Lastly, you need to add a cron entry to update the statistics on a regular basis: # AWStats */15 * * * * perl /usr/share/webapps/awstats/6.9-r1/hostroot/cgi-bin/awstats.pl -config=www.alunduil.com -update > /dev/null</p><p>Everything should be running smoothly but give your installation some time to begin collecting statistics.</p> ]]></content:encoded> <wfw:commentRss>http://www.alunduil.com/2010/03/02/running-awstats-on-gentoo/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using apc
Page Caching using memcached (user agent is rejected)
Database Caching 4/12 queries in 0.015 seconds using memcached

Served from: www.alunduil.com @ 2010-09-09 07:58:53 -->