Benutzer-Werkzeuge

Webseiten-Werkzeuge


freebsd:awstats

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

freebsd:awstats [2013/12/16 12:30] (aktuell)
idefix freebsd-setting_up_awstats umbenannt in freebsd:awstats
Zeile 1: Zeile 1:
 +First install the port:
 +<​code>​
 +/​usr/​ports/​net/​p5-Geo-IP
 +/​usr/​ports/​www/​awstats
 +</​code>​
 +
 +Install awstats configuration:​
 +<​code>​
 +mkdir /​usr/​local/​etc/​awstats
 +cd /​usr/​local/​etc/​awstats
 +cp /​usr/​local/​www/​awstats/​cgi-bin/​awstats.model.conf .
 +mkdir /​var/​lib/​awstats
 +ln -s /​usr/​local/​etc/​awstats /​etc/​awstats
 +</​code>​
 +
 +Now edit our standard template /​usr/​local/​www/​awstats/​cgi-bin/​awstats.model.conf:​
 +<​code>​
 +LogFile="/​usr/​home/​http/​fechner.net/​logs/​custom.log"​
 +SiteDomain="​__ENVNAME__"​
 +AllowAccessFromWebToAuthenticatedUsersOnly=1
 +AllowAccessFromWebToFollowingAuthenticatedUsers="​__REMOTE_USER"​
 +DirData="/​var/​lib/​awstats"​
 +</​code>​
 +This file can be copied now to the following names:
 +awstats.<​domain>​.conf
 +
 +Make necessary changes in this new file like path for logfile etc.
 +
 +To generate statistics edit /​etc/​crontab:​
 +<​code>​
 +  -  Updatw awstats
 +30      23      *       ​* ​      ​* ​      ​root ​   /​usr/​local/​www/​awstats/​tools/​awstats_updateall.pl now
 +</​code>​
 +
 +Make sure, that you have something like this line in your apache configuration:​
 +<​code>​
 +CustomLog /​home/​http/​default/​logs/​custom.log combined
 +</​code>​
 +
 +Create a file /​usr/​local/​etc/​apache22/​awstats.conf:​
 +<​code>​
 +Alias /​awstatsclasses "/​usr/​local/​www/​awstats/​classes/"​
 +Alias /awstatscss "/​usr/​local/​www/​awstats/​css/"​
 +Alias /​awstatsicons "/​usr/​local/​www/​awstats/​icons/"​
 +Alias /awstats/ "/​usr/​local/​www/​awstats/​cgi-bin/"​
 +
 +  - 
 +  -  This is to permit URL access to scripts/​files in AWStats directory.
 +  - 
 +<​Directory "/​usr/​local/​www/​awstats/">​
 +<​code>​
 +    Options +ExecCGI
 +    DirectoryIndex awstats.pl
 +    AllowOverride AuthConfig
 +    Order allow,deny
 +    Allow from all
 +    AuthType Basic
 +    AuthName stats
 +    AuthUserFile /​usr/​local/​etc/​apache22/​htpasswd.awstats
 +    require valid-user</​code>​
 +</​Directory>​
 +</​code>​
 +To load the file from apache add to the file /​usr/​local/​etc/​apache22/​httpd.conf the line:
 +<​code>​
 +Include /​usr/​local/​etc/​apache22/​awstats.conf
 +</​code>​
 +
 +Now retart apache and go to the URI webside/​awstats/​.
  
freebsd/awstats.txt · Zuletzt geändert: 2013/12/16 12:30 von idefix