Awstats Installation and Configuration.

11:00 AM

Linux

System Details: This installation has been done on following environment. This can be replicated on RedHat server as well.

OS: CentOS release 5.5
Perl: Perl, v5.8.8
Web Server: Apache/2.2.3 (installed in "/etc/httpd")

1. Download Awstats:

Download the awstats tarball and untar the file into /usr/local/ directory (you may have your own choice).
Steps:

# cd /usr/local

# wget http://prdownloads.sourceforge.net/awstats/awstats-7.0.tar.gz

# tar -xzvf awstats-7.0.tar.gz

# mv awstats-7.0.tar.gz /tmp

# mv awstats-7.0/ awstats

# cd awstats

2. Configure Awstats:

To configure the awstats we need to execute the "awstats_configure.pl" script from /usr/local/awstats/tools directory. It will ask following questions:

Config file path ('none' to skip web server setup):

>/etc/httpd/conf/httpd.conf (your apache configuration file path).

Do you want me to build a new AWStats config/profile

file (required if first install) [y/N] ? y (if you want to create a new config file for a http VirtualHost(for your URL))

Your web site, virtual server or profile name:

>myurl (Use your website name as profile name).

In which directory do you plan to store your config file(s) ?
Default: /etc/awstats

Directory path to store config file(s) (Enter for default): (I'm keeping this default)

That's it for initial setup. Now we need to configure the config file, which was created during above setup( in /etc/awstats directory).

Press the Entre twice now. It will show you the following important information.

You can do it manually by adding the following command to your cron:

/usr/local/awstats/wwwroot/cgi-bin/awstats.pl -update -config=>

Or if you have several config files and prefer having only one command:

/usr/local/awstats/tools/awstats_updateall.pl now

A SIMPLE config file has been created: /etc/awstats/awstats.myurl.conf

You should have a look inside to check and change manually main parameters.
You can then manually update your statistics for '>' with command:

The "awstats.myurl.conf" if the configuration file which can be used to configure to enable/disable the required parameters in awstats for the particular URL. The default option would be enabled and configured automatically. Please check following parameters:

DirData="/var/lib/awstats"

LogFile="/var/log/httpd/access.log"

Configuration changes made in apache config "/etc/httpd/conf/httpd.conf"

#. Directives to allow use of AWStats as a CGI

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.

<Directory "/usr/local/awstats/wwwroot">
Options None
AllowOverride None
Order allow,deny
Allow from all
</Directory>

Create the data directory mentioned above.

#mkdir /var/log/awstats

#chown -R apache:apache /var/log/awstats

#/etc/init.d/httpd restart

Now access the following URL to access the awstats report.

http://www.yourdomain.com/awstats/awstats.pl?config=myurl

Thanks for reading this (smile)

Windows (in progress)

System Details: This installation has been done on following environment.

OS: Windows 2008 64 bit R2 ENT
Perl(ActieState 64 bit): Perl v5.16
Web Server (64 bit): Apache/2.4.9 trusted safe(installed in "E:/apache24")
Compiler (64 bit): Visual C++ 2010 SP1
PHP (64 bit):5.3
Awstats: 7.3
Jawstats: 0.7 (beta)

C:\Windows\system32>E:\awstats-7.3\tools\awstats_configure.pl

C:\Windows\system32>E:\awstats-7.3\tools\awstats_configure.pl

----- AWStats awstats_configure 1.0 (build 20140126) (c) Laurent Destailleur ---

--

This tool will help you to configure AWStats to analyze statistics for

one web server. You can try to use it to let it do all that is possible

in AWStats setup, however following the step by step manual setup

documentation (docs/index.html) is often a better idea. Above all if:

- You are not an administrator user,

- You want to analyze downloaded log files without web server,

- You want to analyze mail or ftp log files instead of web log files,

- You need to analyze load balanced servers log files,

- You want to 'understand' all possible ways to use AWStats...

Read the AWStats documentation (docs/index.html).

-----> Running OS detected: Windows

-----> Check for web server install

awstats_configure did not find your Apache web main runtime.

Please, enter full directory path of your Apache web server or

'none' to skip this step if you don't have local web server or

don't have permission to change its setup.

Example: c:\Program files\apache group\apache

Apache Web server path ('none' to skip):

> E:\Apache24

Now, enter full config file path of your Web server.

Example: /etc/httpd/httpd.conf

Example: /usr/local/apache2/conf/httpd.conf

Example: c:\Program files\apache group\apache\conf\httpd.conf

Config file path ('none' to skip web server setup):

> E:\Apache24\conf\httpd.conf

-----> Check and complete web server config file 'E:\Apache24\conf\httpd.conf'

Add 'Alias /awstatsclasses "E:/awstats-7.3/wwwroot/classes/"'

Add 'Alias /awstatscss "E:/awstats-7.3/wwwroot/css/"'

Add 'Alias /awstatsicons "E:/awstats-7.3/wwwroot/icon/"'

Add 'ScriptAlias /awstats/ "E:/awstats-7.3/wwwroot/cgi-bin/"'

Add '<Directory>' directive

AWStats directives added to Apache config file.

-----> Update model config file 'E:/awstats-7.3\wwwroot\cgi-bin\awstats.model.co

nf'

File awstats.model.conf updated.

-----> Need to create a new config file ?

Do you want me to build a new AWStats config/profile

file (required if first install) [y/N] ? y

-----> Define config file name to create

What is the name of your web site or profile analysis ?

Example: www.mysite.com

Example: demo

Your web site, virtual server or profile name:

> mytestsite.com

-----> Create config file 'E:/awstats-7.3\wwwroot\cgi-bin\awstats.mytestsite.

com.conf'

Config file E:/awstats-7.3\wwwroot\cgi-bin\awstats.mytestsite.conf creat

ed.

-----> Add update process inside a scheduler

Sorry, for Windows users, if you want to have statistics to be

updated on a regular basis, you have to add the update process

in a scheduler task manually (See AWStats docs/index.html).

Press ENTER to continue...

A SIMPLE config file has been created: E:/awstats-7.3\wwwroot\cgi-bin\awstats.mytestsite.com.conf

You should have a look inside to check and change manually main parameters.

You can then manually update your statistics for 'mytestsite.com' with comman

d:

> perl awstats.pl -update -config=mytestsite.com

You can also read your statistics for 'mytestsite.com' with URL:

> http://localhost/awstats/awstats.pl?config=mytestsite.com

Press ENTER to finish...

You Might Also Like

0 comments

Contact Form

Name

Email *

Message *

Translate

Wikipedia

Search results