<?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>Albertech.net &#187; awstats</title>
	<atom:link href="http://albertech.net/tag/awstats/feed/" rel="self" type="application/rss+xml" />
	<link>http://albertech.net</link>
	<description>Tips, Tricks, and Reviews in Linux, Apache, MySQL, PHP</description>
	<lastBuildDate>Wed, 28 Jul 2010 16:09:13 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>awstats: Import old log files</title>
		<link>http://albertech.net/2009/09/awstats-import-old-log-files/</link>
		<comments>http://albertech.net/2009/09/awstats-import-old-log-files/#comments</comments>
		<pubDate>Thu, 03 Sep 2009 16:26:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[awstats]]></category>
		<category><![CDATA[import]]></category>
		<category><![CDATA[old logs]]></category>

		<guid isPermaLink="false">http://albertech.net/?p=256</guid>
		<description><![CDATA[One thing I've encountered with Awstats is adding in old apache log files. This is useful if you are migrating data from servers. By default, Awstats will ignore ALL past dates in the log that occur before the most recent log entry date. In order to avoid Awstats from finding the "recent log entry date", you will need move all Awstats cached files into a separate folder. ]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Falbertech.net%252F2009%252F09%252Fawstats-import-old-log-files%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22awstats%3A%20Import%20old%20log%20files%22%20%7D);"></div>
<p>One thing I&#8217;ve encountered with Awstats is adding in old apache log files. This is useful if you are migrating data from servers. By default, Awstats will ignore ALL past dates in the log that occur before the most recent log entry date. In order to avoid Awstats from finding the &#8220;recent log entry date&#8221;, you will need move all Awstats cached files into a separate folder. I&#8217;ve verified that this works, so if you have any questions feel free to comment.</p>
<p align="left"><strong>1) Locate your awstats data directory.</strong> Most commonly found in /var/lib/awstats</p>
<p align="left">2) <strong>Create a new folder inside the directory</strong>. <strong>Move all awstats* files to the new folder.</strong></p>
<p align="left">3) <strong>Run  awstats update process on all log files in chronological order</strong>. AWStats will not complain about the &#8220;too old record&#8221; because there is no history files in DirData directory that contains compiled data more recent than record.</p>
<p align="left"><strong>Edit the awstats.conf inside /etc/awstats</strong><br />
Locate the Apache logfile you need. It must be the oldest one you want to import. Awstats will chronologically add in the files, so make sure you add them in the right order. Edit the line starting with <strong>LogFile=&#8221;[log file location]</strong>&#8221;</p>
<p>Run the Awstats command (through the web browser or through shell via the perl command line)</p>
<p>4) <strong>Move the history files back.</strong> Once you process through all the logfiles, move the Awstats history files inside the /var/lib/awstats/newfolder back into /var/lib/awstats</p>

]]></content:encoded>
			<wfw:commentRss>http://albertech.net/2009/09/awstats-import-old-log-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>awstats &#8211; remove image files</title>
		<link>http://albertech.net/2009/02/awstats-remove-image-files/</link>
		<comments>http://albertech.net/2009/02/awstats-remove-image-files/#comments</comments>
		<pubDate>Tue, 03 Feb 2009 22:41:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[awstats]]></category>
		<category><![CDATA[awstats.conf]]></category>
		<category><![CDATA[remove images]]></category>

		<guid isPermaLink="false">http://albertech.net/?p=76</guid>
		<description><![CDATA[If you want to remove image files from your awstats reports, modify the SkipFiles variable in the /etc/awstats/awstats.conf (or awstats.YOURHOST.conf)  

Do a search for "SkipFiles" in the file using nano/vi/emacs and find the section that talks about "Use SkipFiles to ignore access to URLs that match one of the following entries..." The SkipFiles line should look similar to the following:

<code>SkipFiles="REGEX[.jpg$] REGEX[.gif$] REGEX[.png$]"
</code>
]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Falbertech.net%252F2009%252F02%252Fawstats-remove-image-files%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22awstats%20-%20remove%20image%20files%22%20%7D);"></div>
<p>If you want to remove image files from your awstats reports, modify the SkipFiles variable in the /etc/awstats/awstats.conf (or awstats.YOURHOST.conf)  </p>
<p>Do a search for &#8220;SkipFiles&#8221; in the file using nano/vi/emacs and find the section that talks about &#8220;Use SkipFiles to ignore access to URLs that match one of the following entries&#8230;&#8221; The SkipFiles line should look similar to the following:</p>
<p><code>SkipFiles="REGEX[.jpg$] REGEX[.gif$] REGEX[.png$]"<br />
</code></p>

]]></content:encoded>
			<wfw:commentRss>http://albertech.net/2009/02/awstats-remove-image-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Awstats setup in Debian</title>
		<link>http://albertech.net/2009/01/awstats-debiansetup/</link>
		<comments>http://albertech.net/2009/01/awstats-debiansetup/#comments</comments>
		<pubDate>Mon, 26 Jan 2009 03:05:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[awstats]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[geoIP]]></category>

		<guid isPermaLink="false">http://albertech.net/?p=65</guid>
		<description><![CDATA[<strong>Installing awstats in Debian with GeoIP caching
</strong>

<strong>First, use apt-get to get the software:</strong>

apt-get install awstats

<strong>Configure awstats:</strong>
Instead of using the awstats configure tool (written in Perl), manually add in the awstats Apache configuration. Using the <a href="http://www.debuntu.org/2006/04/21/33-how-to-setting-up-awstats-with-apache-2-on-debianubuntu">tutorial from debuntu</a>, make a file inside your apache config folder called awstats.conf with the following lines.

<code>Alias /awstatsclasses "/usr/share/awstats/lib/"
Alias /awstats-icon/ "/usr/share/awstats/icon/"
Alias /awstatscss "/usr/share/doc/awstats/examples/css"
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch</code>

<strong>Inside the Apache2.conf file (or virtual host conf file inside the sites-available folder) add this to the end of the file:</strong>

<code>Include /etc/apache2/awstats.conf</code>

<strong>Next, copy the /usr/lib/cgi-bin/awstats.pl file to the apache cgi-bin folder.</strong> If you have virtual hosts enabled, copy it to ... ]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Falbertech.net%252F2009%252F01%252Fawstats-debiansetup%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Awstats%20setup%20in%20Debian%22%20%7D);"></div>
<p><strong>Installing awstats in Debian with GeoIP caching<br />
</strong></p>
<p><strong>First, use apt-get to get the software:</strong></p>
<p>apt-get install awstats</p>
<p><strong>Configure awstats:</strong><br />
Instead of using the awstats configure tool (written in Perl), manually add in the awstats Apache configuration. Using the <a href="http://www.debuntu.org/2006/04/21/33-how-to-setting-up-awstats-with-apache-2-on-debianubuntu">tutorial from debuntu</a>, make a file inside your apache config folder called awstats.conf with the following lines.</p>
<p><code>Alias /awstatsclasses "/usr/share/awstats/lib/"<br />
Alias /awstats-icon/ "/usr/share/awstats/icon/"<br />
Alias /awstatscss "/usr/share/doc/awstats/examples/css"<br />
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch</code></p>
<p><strong>Inside the Apache2.conf file (or virtual host conf file inside the sites-available folder) add this to the end of the file:</strong></p>
<p><code>Include /etc/apache2/awstats.conf</code></p>
<p><strong>Next, copy the /usr/lib/cgi-bin/awstats.pl file to the apache cgi-bin folder.</strong> If you have virtual hosts enabled, copy it to the cgi-bin located in the designated virtual hosts folder.</p>
<p><strong>Configure the awstats.conf sample file located in /etc/awstats/awstats.conf</strong><br />
1) Set the LogFile to the server&#8217;s logfile directory (usually /var/log/apache2/access.log)<br />
2) Set LogFormat to 1.<br />
3) Set DNSLookup=0 (No DNS Lookup is necessary when you use GeoIP DB, instructions are below)<br />
4) Uncomment this line (remove the # from the beginning)<br />
LoadPlugin=&#8221;geoip GEOIP_STANDARD /usr/share/GeoIP/GeoIP.dat&#8221;</p>
<p><strong>Install GeoIP to speed up the hostname lookups. </strong>This will significanly improve the performance since DNS lookups will generally take a long time. Using <a href="http://www.ducea.com/2006/06/14/install-geoip-perl-module-on-debian/">this tutorial</a>, install the GeoIP library:</p>
<p>wget http://geolite.maxmind.com/download/geoip/api/c/GeoIP-1.4.5.tar.gz</p>
<p>Download and extract the file.  Inside the GeoIP 1.4.5 folder, run:</p>
<p><code>./configure<br />
make<br />
make check<br />
make install<br />
</code></p>
<p>Next, download the latest GeoIP perl module -and- latest GeoLite country database.<br />
<a href="http://www.maxmind.com/download/geoip/api/perl/">http://www.maxmind.com/download/geoip/api/perl/</a> I usually run wget to download the file from shell. wget http://geolite.maxmind.com/download/geoip/api/perl/Geo-IP-1.36.tar.gz</p>
<p>Extract the tar file and inside the Geo-IP folder, run:</p>
<p><code>perl Makefile.PL<br />
make<br />
make test<br />
make install</code></p>
<p><strong>GeoIP should now be installed. You can now generate the reports:</strong><br />
/usr/lib/cgi-bin/awstats.pl -config=[NAME OF YOUR INSTALL] -update<br />
For instance, if you called the install &#8220;sample&#8221;, you should have a file called /etc/awstats/awstats.sample.conf    The command for sample would be:<br />
/usr/lib/cgi-bin/awstats.pl -config=sample -update<br />
<strong><br />
To run awstats:<br />
http://[SERVER]/cgi-bin/awstats.pl?config=[NAME OF YOUR INSTALL]</strong></p>

]]></content:encoded>
			<wfw:commentRss>http://albertech.net/2009/01/awstats-debiansetup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
