FreeBSD 14
Sponsored Link

Apache httpd : Log Report : AWStats2024/02/02


Install AWStats to report httpd access logs.

[1] Install and Configure AWstats.
root@www:~ #
pkg install -y awstats
root@www:~ #
cp /usr/local/www/awstats/cgi-bin/awstats.model.conf /usr/local/www/awstats/cgi-bin/awstats.`hostname`.conf

root@www:~ #
vi /usr/local/www/awstats/cgi-bin/awstats.`hostname`.conf
# line 50 : change to the log file you like to report

# line 126 : set [1] if httpd log format is [combined]
# for [common], set [4]

# line 157 : set hostname

# line 172 : set domains or IP addresses you'd like to exclude on reports

root@www:~ #
cp /usr/local/share/doc/awstats/httpd_conf /usr/local/etc/apache24/Includes/awstats.conf

root@www:~ #
vi /usr/local/etc/apache24/Includes/awstats.conf
# create new

<Directory "/usr/local/www/awstats">
    Options None
    AllowOverride None
    #Order allow,deny
    #Allow from all
    # access permission for your local network
    Require ip

root@www:~ #
vi /usr/local/etc/apache24/httpd.conf
<IfModule !mpm_prefork_module>
        # line 166 : uncomment below if httpd is running in except [prefork] mode
        LoadModule cgid_module libexec/apache24/
<IfModule mpm_prefork_module>
        # line 169 : uncomment below if httpd is running in [prefork] mode
        #LoadModule cgi_module libexec/apache24/

root@www:~ #
service apache24 reload

# generate reports

root@www:~ #
/usr/local/www/awstats/cgi-bin/ -config=`hostname` -update

Create/Update database for config "/usr/local/www/awstats/cgi-bin/" by AWStats version 7.9 (build 20230108)
From data in log file "/var/log/"...
Phase 1 : First bypass old records, searching new record...
Direct access after last parsed record (after line 6)
Jumped lines in file: 6
 Found 6 already parsed records.
Parsed lines in file: 5
 Found 0 dropped records,
 Found 0 comments,
 Found 0 blank records,
 Found 0 corrupted records,
 Found 0 old records,
 Found 5 new qualified records.
[2] Access to the URL [(your server's name or IP address/)/awstats/] from any client computer on allowed network with web browser. Then you can see http access reports.
Matched Content