This setup is for an Apache or compatible web server on Linux.
When the awstats_configure.pl runs, the script asks following info:
A) awstats_configure.pl tries to determine the current log format from the Apache web server configuration file httpd.conf (it asks for the path if not found). If you use a common log, awstats_configure.pl will suggest changing it to the NCSA combined/XLF/ELF format (you can use your own custom log format but this predefined log format is often the best choice and makes setup easier).
If you answer yes, awstats_configure.pl will modify your httpd.conf, changing the following directive:
CustomLog /logpath/logfile common
CustomLog /logpath/logfile combined
B) awstats_configure.pl will then add, if not already present, the following directives to your Apache configuration file (note that the “/usr/local/awstats/wwwroot” path might differ according to your distribution or OS:
# Directives to add to your Apache conf file to allow use of AWStats as a CGI.
# Note that path “/usr/local/awstats/” must reflect your AWStats Installation path.
Alias /awstatsclasses “/usr/local/awstats/wwwroot/classes/”
Alias /awstatscss “/usr/local/awstats/wwwroot/css/”
Alias /awstatsicons “/usr/local/awstats/wwwroot/icon/”
ScriptAlias /awstats/ “/usr/local/awstats/wwwroot/cgi-bin/”
# This is to permit URL access to scripts/files in AWStats directory.
Allow from all
C) if changes were made as indicated in parts A and B, awstats_configure.pl restarts Apache to apply the changes. To be sure the log format change is effective, go to your homepage. This is an example of the type of records you should see inserted in your new log file after Apache was restarted:
184.108.40.206 – – [dd/mmm/yyyy:hh:mm:ss +0000] “GET / HTTP/1.1” 200 1234 “http://www.from.com/from.html” “Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)”
D) awstats_configure.pl will ask you for a name for the configuration profile file. Enter an appropriate name such as that of your web server or the virtual domain to be analyzed, i.e. mysite.
awstats_configure.pl will create a new file called awstats.mysite.conf by copying the template file awstats.model.conf. The new file location is:
– For Linux/BSD/Unix users: /etc/awstats.
Like this post ?
Share on your Social Networking Profile ( Facebook, Twitter & Google+ ) and get a flat 10% Recurring discount on our VPS Hosting and Dedicated Servers.
Email us the shared link at : [email protected] or speak to our live chat operator now, by clicking on the “Live Chat” Scroller on the left-hand side of this page and we will provide you with the discount Coupon right away!