# chown -R http:http /usr/share/webapps/awstats/Ģ. It is necessary to get the folders and files owned by user http and group http with the following command: If your web server software is nginx, follow steps below:ġ. Setting a authentication would help keeping these stats private. Warning: With these settings anyone will be able to reach AWStats. usr/share/awstats/tools/awstats_ config=apache -update -awstatsprog=/usr/share/webapps/awstats/cgi-bin/ -dir=/srv/http/awstats Now you can run the script to test the results, e.g. LogFile=/var/log/httpd/returnfalse-access_log Then find the line on which LogFile variable is defined, and set it as the path that Apache logs accesses (which you set to be logged as 'combined' format before): Open the configuration file created by awstats_ with your favorite text editor. If you successfully created a configuration file there is one thing that you should modify manually. Perl /usr/share/awstats/tools/awstats_Īnd follow the instructions. Instead of creating these configuration files, you can use AWStats' configuration tool. This script reads AWStats configuration files in /etc/awstats and updates the stats for the sites that are defined in these configuration files. The package comes with an script to update stats shown on AWStats. Reason: The commands for running awstats_ and awstats_ require user prompts. One last thing, which is the actual aim, make AWStats read logs and convert them to stats. Now if you have done all steps correctly, you should be able to see AWStats running on after restarting Apache's rvice unit. Include this file (in AUR case, the path is /etc/httpd/conf/extra/nf) to Apache's main configuration: ScriptAlias /awstats/ "/usr/share/webapps/awstats/cgi-bin/" But in case you want to create your own configuration, default one is this:Īlias /awstatsclasses "/usr/share/webapps/awstats/classes/"Īlias /awstatscss "/usr/share/webapps/awstats/css/"Īlias /awstatsicons "/usr/share/webapps/awstats/icon/" The package in the AUR has a default one, and it is working without any problem. If you set the log format, then next step is including AWStats configuration file in Apache. Including AWStats configuration in Apache's configuration So if you are changing Apache's log format now, you probably should delete old log files not to confuse AWStats. Warning: At this point, if apache has started to log access with different format, AWStats will complain about this because it cannot read. ServerName ErrorLog "/var/log/httpd/returnfalse-error_log"ĬustomLog "/var/log/httpd/returnfalse-access_log" combined To do so, your Apache configuration should look like this: Unless you want a different behavior, you should set your access log format as 'combined'. LoadModule perl_module modules/mod_perl.soīy default AWStats requires Apache to record access logs as 'combined'. To enable mod_perl in Apache, you should add following line to Apache configuration ( /etc/httpd/conf/nf): When Apache HTTP Server is used as a web server, the mod_perl AUR package is required as well. It can analyze log files from all major server tools like Apache log files (NCSA combined/XLF/ELF log format or common/CLF log format), WebStar, IIS (W3C log format) and a lot of other web, proxy, wap, streaming servers, mail servers and some ftp servers. 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. From AWStats - Free log file analyzer for advanced statistics:ĪWStats is a free powerful and featureful tool that generates advanced web, streaming, ftp or mail server statistics, graphically.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |