![]() But on my site the lost statistics are marginal (and honestly not that important). ![]() Granted, during the time awstats is running, there could be several new hits on the website and therefore new entries in the access log. usr/lib/cgi-bin/ -config=> /dev/nullīesides the obvious logrotate options, the magic happens in the prerotate section: Right before rotating the log file(s), launch the awstats command and analyze the access log.Īfter the log was rotated, the postrotate section starts and reloads Apache (to prevent the Apache process of writing into the previous log file's inode). To solve that issue, awstats can be called during the log rotation phase: Now visit your awstats site at the url /awstats/. sudo apache2ctl configtest sudo apache2ctl restart. And afaik, there is no config parameter to tell awstats about a location/path of a rotated log file. Now check the config syntax and if everything is fine, then restart apache. Problem: When you rotate the log file, awstats doesn't know about it and looses all visitor data now stored in the rotated access log. usr/lib/cgi-bin/ -config=The above command launches the awstats script with a config /etc/awstats/awstats.But as the log file grows and grows, you want of course to rotate the log files. You have a daily cronjob which starts the awstats script like this: Situation: You have your website running on an Apache web server and you're using awstats for your web statistics. AWStats / wwwroot / cgi-bin / Go to file Go to file T Go to line L Copy path Copy This commit does not belong to any branch on this repository. ![]() Published on June 23rd 2014 - Listed in Linux Internet All the need to be changed was the location of the data file in the awstats configuration file.Using awstats in combination with logrotate ![]() This was easy enough to fix: the location of the GeoIP database on the new server was different from the old server. (A module required by plugin might be missing). After installing it, I still got an error message like so: Error: Plugin init for plugin 'geoip' failed with return code: Error opening /usr/share/GeoIP/GeoIP.dat at /usr/lib/perl5/site_perl/5.8.8/Geo/IP/PurePerl.pm line 59. How to install the Geo IP PurePerl plugin is covered in an earlier post. This log analyzer works as a CGI or from command line and shows you all possible. However, when I went to view the stats in a web browser, I got the following error messages: Error: Plugin load for plugin 'geoip' failed with return code: Error: Can't locate Geo/IP.pm in Need Perl module Geo::IP or Geo::IP::PurePerl This tutorial will help you get AWStats and Lighttpd working together. All the existing AWStats configuration and data files were copied over to the new server. I use the GeoIP plugin to translate IP address to country codes, and was migrating a site from an old server to a new one. If you don’t enable Options ExecCGI then you’ll see something like this in your Apache error logs: Options ExecCGI is off in this directory: /usr/local/awstats/wwwroot/cgi-bin/ pl enabled as a cgi-script for AWStats, then the above directory block should look like this instead: G) Edit located in C:Program FilesAWStatswwwrootcgi-bin and change the path on the first line to point to exact location of perl.exe in your. sudo -u nginx /usr/share/awstats/Note: The -u nginx part tells sudo to run the command as.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |