» 2012 » December » 26 の記事

~ install awstats on ubuntu ~

connie 2012.12.26 | ubuntu | | No Comments
sudo apt-get install awstats

Copy the config file for new site (should name as wstats.yourdomain.ext.conf)

cp /etc/awstats/awstats.conf /etc/awstats/awstats.yourdomain.ext.conf

Open the config file, and modify these lines

#Path to access.log for your domain
LogFile="/var/log/apache2/access.log"
#I recommend '1' for more detailed information
LogFormat=1
SiteDomain="yourdomain.ext"
HostAliases="localhost 127.0.0.1 yourdomain.ext"

For running the first time use

/usr/lib/cgi-bin/awstats.pl -config=yourdomain.ext

For update

/usr/lib/cgi-bin/awstats.pl -config=yourdomain.ext -update

apache setting
 

<VirtualHost *:80>
ServerName ***.***.***.***
DocumentRoot /var/www/
<Directory "/var/www/">
Options FollowSymLinks
AllowOverride ALL
Order allow,deny
Allow from all
</Directory>
Alias /awstatsclasses/ "/usr/share/awstats/lib/"
Alias /awstats-icon/ "/usr/share/awstats/icon/"
Alias /awstatscss "/usr/share/doc/awstats/examples/css"
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
ScriptAlias /awstats/ /usr/lib/cgi-bin/
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
</VirtualHost>

/etc/init.d/apache2 reload

0 */3 * * * root /usr/lib/cgi-bin/awstats.pl -config=yourdomain.ext -update &gt;/dev/null

| HOME |

Smiley face

December 2012
S M T W T F S
 1
2345678
9101112131415
16171819202122
23242526272829
3031