Configure awstats for zeus
By makeaweli
- 1 minutes read - 201 wordsInstall and configure awstats on a zeus webserver.
Install awstats
Download and extract awstats to /usr/local
Rename extracted directory to awstats
Configure awstats
Copy the default configuration file awstats/wwwroot/cgi-bin/awstats.model.conf to /etc/awstats/. Rename this file by replacing ‘model’ with your website name, ie awstats.www.gemini.edu.
Open this file and edit the following:
Move the DirData from the awstats directory to your site log directory:
Modify the /etc/awstats configuration file with new location:
Configure awstats_misc_tracker.js
Enabling the javascript code to run will track useful things about a client like screen resolution, and browser plugins.
Add the following to the head element your root index web page:
Modify the config script:
Configure Geographical Tracking
Install the Geo::IPfree perl module using cpan:
Modify the config script:
Configure zeus logging
Make sure the log format is NCSA Combined
Configure zeus cgi
You must create a directory alias for the awstats cgi-bin:
- Requests for…
- /stats/cgi-bin/
- Are mapped to…
- /usr/local/awstats/wwwroot/cgi-bin/
Configure zeus url mappings
There are several aliases required for awstats directories:
Requests for…Are mapped to…
<td>
/usr/local/awstats/wwwroot/
</td>
<td>
/usr/local/awstats/wwwroot/
</td>
<td>
/usr/local/awstats/wwwroot/icon/
</td>
Add awstats in cron
Import log files into awstats
To import log files, each log file must be imported chronologically. If not, the stats for the month will be inaccurate: