Installation Instruction
cd /usr/local/ git clone https://github.com/eldy/awstats.git cd awstats perl tools/awstats_configure.pl
Do you want me to setup Apache to write 'combined' log files [y/N] ? --> y
Do you want me to build a new AWStats config/profile file (required if first install) [y/N] --> y
Your web site, virtual server or profile name: --> cwp
Directory path to store config file(s) (Enter for default): --> press enter
Setup Awstats Logging
mkdir -p /var/lib/awstats sed -i 's|var/\log/\httpd/\mylog.log|usr\/local/apache/logs/access_log|g' /etc/awstats/awstats.cwp.conf rm -rf /usr/local/apache/logs/access_log
Enable CGI in Apache
Copy paste all lines not one by one
cat > /usr/local/apache/conf.d/mod_cgid.conf << "EOF" LoadModule cgid_module modules/mod_cgid.so <IfModule cgid_module> <Directory /usr/local/awstats/wwwroot/cgi-bin/> Options ExecCGI SymLinksifOwnerMatch SetHandler cgi-script AddHandler cgi-script .cgi .pl .py Require all granted AllowOverride All </Directory> </IfModule> EOF
Restart Apache
service httpd restart
Make cron to update Awstats every 1 minute
crontab -l | { cat; echo "* * * * * /usr/local/awstats/wwwroot/cgi-bin/awstats.pl -update -config=cwp"; } | crontab -
Access Awstats
http://serverip/awstats/awstats.pl?config=cwp