There was a problem loading the comments.

User Guide - Using AWStats for web analytics

Support Portal  »  Knowledgebase  »  Viewing Article

  Print

Applicable Plans - All eApps General VPS Plans

User Guide - Using AWStats for web analytics

"AWStats is a free powerful and featureful tool that generates advanced web, streaming, ftp or mail server statistics, graphically. 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 http://awstats.sourceforge.net/

Overview

AWStats is a log file analyzer that can show nearly real time statistics for your websites. It works by reading the access_log files for your sites, and displays that information either in a web page, or from the command line.

AWStats is a free and open source log analyzer that comes with no guarantee of accuracy. AWStats is geared more toward network administrators who want to measure traffic and access to their sites, rather than business analytics needs. If you need a tool to monitor site statistics in order to validate traffic or hit counts for some type of monetary reason, then you may want to consider using a tool like Google Analytics or Google Urchin or one of the many proprietary site analytic tools or services available.

Installing and Enabling AWStats

Using AWStats


AWStats Common Issues


Links to other information



Installing and Enabling AWStats

Installing AWStats

The AWStats application is available on all eApps General VPS plans, and all operating systems (Fedora Core, CentOS 4 and CentOS 5 or newer). It is not installed by default unless you ordered it during the initial VPS provisioning process.

For all plans, make sure that AWStats is up to date before using it. See the User Guide - Upgrading Applications in the PBA Control Panel - http://support.eapps.com/hsp/upgrades for more information on upgrading applications.

To check if AWStats is already installed, go the PBA Control Panel, and click on the System tab. If necessary, click on the Select Another System (Subscription) link on the left and choose the correct Virtuozzo container.

Then click on All Applications. On a CentOS 5 VPS, the AWStats application will be listed like this: Awstats. For CentOS 4, it will be listed like this: Awstats log analyzer.

If AWStats is not installed, then click on Add Application, and look for the AWStats application in the list of applications to install. Check the box next to the application, and then scroll down and click Next.

This takes you back to the All Applications screen. Wait for around five minutes, and then click on the Refresh link at the upper right, just under the word Parallels. The application should now show as installed. If it still shows as Scheduled, wait another five minutes, and click refresh again. If it still shows as Scheduled, or in Error, please contact eApps Technical Support.

Enabling AWStats

On Fedora Core and CentOS 4 plans, AWStats is enabled for all sites when it is installed. On CentOS 5 plans, AWStats must be enabled on a per-site basis.

To enable AWStats for a site on CentOS 5, click on the Site tab, and if necessary, click on Select Another Site and choose the correct site from the list.

Then click on Awstats in the Applications section. The status will show as Enabled. Click on the Disable button. When the screen refreshes, you will be in the Applications list for the site. Click back on the link for Awstats, and it will now show as Disabled. Click on the Enable button. This writes the correct directories to the site directory under the site admin user, and also creates the configuration file in the /etc/awstats directory.

Upgrading AWStats

This User Guide is written for the latest versions of AWStats currently available. If your version of AWStats is older than the latest versions available for your plan, these instructions may not work.
For information on how to upgrade applications, see the User Guide - Upgrading Applications in the PBA Control Panel. This explains the general upgrade process for all applications.
  • For a Fedora Core VPS, the newest version of AWStats available is version 6.7. However, to upgrade from an older version that you may have installed, you will have to  uninstall the older version of AWStats, and then install the new version. This is only valid for Fedora Core plans.
  • For a CentOS 4 VPS, the newest version of AWStats available is version 6.7. Follow the instructions in the Upgrading Applications in the PBA Control Panel user guide that are specific to Fedora and CentOS 4.

To see what operating system (OS) you have, click on the Subscriptions icon from the My Account tab of your Control Panel. Then click on the name of the subscription you want to see. The OS for the subscription will be displayed near the top of the page. If you are not on a CentOS 5 plan, but would like information on updating your plan, please contact eApps Technical Support for more information.


Using AWStats

Fedora Core and CentOS 4

To access AWStats for a site, log in to the PBA Control Panel, and once you are logged in, click on the Site tab. If necessary, click on the Select Another Site link on the left, and choose the correct site.

Then, click on the link for Awstats log analyzer. This shows the version of AWStats, and the Control Panel URL. In the Description is the log in username  and password, as well as information on how to change the password. If you do not see a login username and password, then you need to upgrade your version of AWStats.

The URL in the Control Panel URL can be used on its own, without having to first access the PBA Control Panel. You can bookmark that link if you wish.

It is highly recommended that you change the default AWStats password as soon as possible. If you are not comfortable working from the command line, you can call and request that eApps Support change the password for you. Be aware that this request can only come from an authorized user on the account, and you may be asked to verify your identity for security purposes.

On older versions of AWStats, there was a server admin user who could see the statistics for all domains on the VPS in an aggregate view. This no longer exists in the never versions of AWStats, only per-site statistics are available.

CentOS 5 or greater

For CentOS 5, AWStats must be enabled on a per-site basis. See Enabling AWStats for more information.

To access AWStats for a site, log in to the PBA Control Panel, and once you are logged in, click on the Site tab. If necessary, click on the Select Another Site link on the left, and choose the correct site.

Then, click on the link for Awstats. This will show you the Control Panel URL, and the default username and password, as well as information on how to change the password.

The Control Panel URL can be bookmarked and used on its own, instead of having to go to the Control Panel every time you wish to look at the site statistics.

It is highly recommended that you change the default AWStats password as soon as possible. If you are not comfortable working from the command line, you can call and request that eApps Support change the password for you. Be aware that this request can only come from an authorized user on the account, and you may be asked to verify your identity for security purposes.


AWStats Common Issues

Allowing Full Year View

By default, AWStats does not allow you to view an entire years worth of statistics from the web interface. This is because viewing a full year of statistics for a large site requires all the data for the current year be reloaded and sorted. On large sites, or on sites on smaller plans and limited resources, this can take quite a long time, and can possibly cause you to exceed your allowed CPU and memory resources, and may even result in crashing applications on your VPS.

If you wish to allow the Full Year View, first check to see if it has already been enabled. In the AWStats web interface, in the Reported period drop down menu, choose -Year- and select the year you wish to see the statistics for from the year drop down, and click OK.

If you get this error message, then Full Year View is not enabled:

Error: Full year view has not been allowed from a browser (AllowFullYearView should be set to 3).

Setup ('/etc/awstats/awstats.eapps-example.com.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).

The error message explains exactly what to do. You will need to log in to the VPS via SSH, and as the root user, change the value for AllowFullYearView to 3 (it is set to 2 by default). The ability to edit files in the vi or vim editor is also required. See the User Guide - SSH User Guide for more information - http://support.eapps.com/hsp/ssh

Note that there are several AWStats configuration files. There is a general awstats.conf file that is the master configuration file. Then there will a file for each site, in the format of awstats.domain.com.conf or awstats.www.domain.com.conf. It is the site specific file or files that you will want to edit.

The configuration files for AWStats are located in the /etc/awstats directory.

[root@eapps-example ~]# cd /etc/awstats/
[root@eapps-example awstats]# ll
total 72
-rw-r--r-- 1 root root 60618 May 10 11:24 awstats.conf
-rw-r--r-- 1 root root  5888 May  6 12:59 awstats.eapps-example.com.conf
[root@eapps-example awstats]#
[root@eapps-example awstats]# vim awstats.eapps-example.com.conf

Find this line in the file:

AllowFullYearView=2

and change the 2 to a 3, and save and exit the file. After saving the file, you will then be able to select -Year- from the Reported period menu and get all the statistics for the year selected. The first time you run the statistics for a full year, it may take a few minutes for the data to show up. Please be patient.

Statistics for 'www' alias not reported

For some of the older versions of AWStats available for the Fedora and CentOS 4 plans, the statistics for the domain alias of 'www' (such as www.example.com) are sometimes not counted correctly. To correct this, create another awstats config file for the 'www' alias for the domain, by simply copying the existing file to a new name.

To do this, you will need to be able to log in to the VPS via SSH, and work as the root user. See the User Guide - SSH User Guide for more information - http://support.eapps.com/hsp/ssh

[root@eapps-example ~]# cd /etc/awstats/
[root@eapps-example awstats]# ll
total 72
-rw-r--r-- 1 root root 60618 May 10 11:24 awstats.conf
-rw-r--r-- 1 root root  5888 May 10 11:49 awstats.eapps-example.com.conf
[root@eapps-example awstats]# cp awstats.eapps-example.com.conf awstats.www.eapps-example.com.conf
[root@eapps-example awstats]# ll
total 80
-rw-r--r-- 1 root root 60618 May 10 11:24 awstats.conf
-rw-r--r-- 1 root root  5888 May 10 11:49 awstats.eapps-example.com.conf
-rw-r--r-- 1 root root  5888 May 10 12:34 awstats.www.eapps-example.com.conf
[root@eapps-example awstats]#

Now the statistics for the 'www' alias will be counted correctly.


Links to other information

AWStats official site - http://awstats.sourceforge.net/

Share via
Did you find this article useful?  

Related Articles


On-Premise Help Desk Software by SupportPal

Categories

© Cloudscale365