Apache Log Analyzer - AWstats2011/03/12 |
Install AWstats that is Apache Log analyzer
|
|
[1] | Install AWstats |
root@www:~# aptitude -y install awstats root@www:~# vi /etc/awstats/awstats.conf # line 122: change # if your config for log format in httpd.conf is 'combined' Set here '1' # If log-config is 'common' set here '4', but in this case, some informations can't be get (browser info and so on) LogFormat= 1 # line 153, set your hostname SiteDomain=" www.srv.world "# line 168: set IP address you'd like to exclude HostAliases="localhost 127.0.0.1 REGEX[server\.world$] REGEX[^10\.0\.0\.] "# line 222: change DirIcons=" ./icon "root@www:~# mkdir /var/www/awstats root@www:~# ln -s /usr/share/awstats/icon /var/www/awstats/icon root@www:~# vi /etc/apache2/sites-available/default <Directory "/usr/lib/cgi-bin"> AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from 10.0.0.0/24 # IP address you allow </Directory> # add these lines <Location /awstats> Order deny,allow Deny from all Allow from 10.0.0.0/24 # IP address you allow </Location> </VirtualHost> root@www:~# /etc/init.d/apache2 restart Restarting web server: apache2 ... waiting . # generate reports root@www:~# /usr/lib/cgi-bin/awstats.pl -config=apache -update Create/Update database for config "/etc/awstats/awstats.conf" by AWStats version 6.95 (build 1.943) From data in log file "/var/log/apache2/access.log"... Phase 1 : First bypass old records, searching new record... Searching new records from beginning of log file... Phase 2 : Now process new records (Flush history on disk after 20000 hosts)... Reverse DNS lookup for ::1 not available without ipv6 plugin enabled. Jumped lines in file: 0 Parsed lines in file: 105 Found 0 dropped records, Found 0 corrupted records, Found 0 old records, Found 105 new qualified records. # generate HTML reports from reports above root@www:~# /usr/lib/cgi-bin/awstats.pl -config=apache -output -staticlink > /var/www/awstats/index.html |
[2] | Access to 'http://(your server's name or IP address)/awstats/', then follwing sacreen is shown and it's possible to see Apache's logs. |
Sponsored Link |