So searching it from beginning of log file.įound 0 new qualified records. var/log/apache2# /usr/lib/cgi-bin/ -config=nf -updateĬreate/Update database for config "/etc/awstats/nf" by AWStats version 7.2 (build 1.992)ĭirect access to last remembered record is out of file. Then Build the AWStats statistics again from apache2 logs #/usr/lib/cgi-bin/ -config=nf -update #chown -R www-data:www-data /var/log/apache2/ Go to default Apache2 access.log DirData, delete all files access.log.** #cd /var/log/apache2/ Go to defaultr DirData /var/lib/awstats, delete all files awstatsMMYYYY.txt #cd /var/lib/awstats Give apache2 (www-data) permission on /var/lib/awstats/ #chown -R www-data:www-data /var/lib/awstats
Analytics awstats update#
Warning: Failed to open for writing last update DNS Cache file “/var/lib/awstats/dnscachelastupdate.txt”: Permission denied Warning: Error while storing hashfile: can’t create /var/lib/awstats/dnscachelastupdate.hash: Permission denied at (eval 5) line 1. Give apache2 (www-data) permission on apache2 log file #chown -R www-data:www-data /var/log/apache2/ #service apache2 restart
Analytics awstats code#
Put code below at bottom 0 0 * * * root /usr/lib/cgi-bin/ -config=nf -update Error and Solutions once update AWStats via web browserĮrror: Couldn’t open server log file “/var/log/apache2/access.log” : Permission denied
The AWStats can access via browser at Setup Cron Job to update every night at midnight () #vim /etc/crontab Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch # for Security, comment code above, add code below and change folder name # Note that path "/usr/local/awstats/" must reflect your AWStats Installation path.Īlias /awstatsclasses "/usr/share/awstats/lib/"Īlias /awstats-icon "/usr/share/awstats/icon/"Īlias /awstatscss "/usr/share/doc/awstats/examples/css" Phase 2 : Now process new records (Flush history on disk after 20000 hosts).Ĭopy code into apache config file, recommend put at the bottom # Directives to add to your Apache conf file to allow use of AWStats as a CGI. Searching new records from beginning of log file. Phase 1 : First bypass old records, searching new record. If it is successful no errors, some output will shown: Create/Update database for config "/etc/awstats/nf" by AWStats version 7.2 (build 1.992)įrom data in log file "/var/log/apache2/access.log". Or if use default nf #/usr/lib/cgi-bin/ -config=nf -update #Default DNSLookup=2, disable DNS Lookup to save memory, set to DNSLookup=0īuild the AWStats statistics from current apache2 logs #/usr/lib/cgi-bin/ -config=nf -update # When this parameter is set to 1, AWStats adds a button on report page to allow to "update" statistics from a web browser # Change to Apache log file, by default it's /var/log/apache2/access.log # LogFormat = "%host %other %logname %time1 %methodurl %code %bytesd %refererquot %uaquot" # Examples for Apache combined logs (following two examples are equivalent): Next, edit configuration file “nf” or “nf” #vim nf For example file for “” or ignore use default nf #cd /etc/awstats
#/etc/init.d/apache2 restartĬreate a configuration file by duplicating AWStats default conf.
Analytics awstats upgrade#
Update and upgrade Debian #apt-get update & apt-get upgrade -yĮnable the CGI module in Apache #a2enmod cgi
It uses a partial information file to be able to process large log files, often and quickly. This log analyzer works as a CGI or from command line and shows you all possible information your log contains, in few graphical web pages. AWStats is an open source Web analytics reporting tool that generates advanced web, streaming, ftp or mail server statistics, graphically.