From: eldy <> Date: Sat, 28 Sep 2002 20:57:41 +0000 (+0000) Subject: Updated documentation. X-Git-Tag: AWSTATS_5_0_RELEASE~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2c96e0986b2ef3bcf1e22b6b35daa0e24faa9802;p=thirdparty%2FAWStats.git Updated documentation. --- diff --git a/docs/awstats_setup.html b/docs/awstats_setup.html index bc750b07..2c5719a5 100644 --- a/docs/awstats_setup.html +++ b/docs/awstats_setup.html @@ -35,64 +35,72 @@ AWStats common use is made in 3 steps:

-

Install and Setup

+

Step 1 : Install and Setup


-1) With Apache Server (on Unix/Linux, Windows, MacOS...)
+A) With Apache Server (on Unix/Linux, Windows, MacOS...)

-* Configure your apache web server to have NCSA combined/XLF/ELF log format (you can use your own log format but -this predefined logformat is often the best choice and made setup easier). You can do this by changing, in httpd.conf, +* Step 1-1
+Configure your apache web server to have NCSA combined/XLF/ELF log format (you can use your own log format but +this predefined logformat is often the best choice and make setup easier). You can do this by changing, in httpd.conf, following directives (See your apache manual for more information):
CustomLog /yourlogpath/yourlogfile common
into
CustomLog /yourlogpath/yourlogfile combined

To be sure the log format change is effective, you can stop Apache, remove all old log files, restart Apache and go to -your homepage. This is an example of records you should get then in the new log file:
+your homepage. This is an example of records you should get then in your new log file:
62.161.78.75 - - [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)"

-* Copy the contents of the uncompressed cgi-bin folder from your hard drive to your server's cgi-bin -directory (this includes awstats.pl, awstats.model.conf, and the lang, lib and plugins sub-directories). +* Step 1-2
+Copy the contents of the uncompressed cgi-bin folder from your hard drive to your server's cgi-bin +directory (this includes awstats.pl, awstats.model.conf, and the lang, lib and plugins sub-directories).

-* If necessary (should not with most Perl interpreter), edit the first (top-most) line of awstats.pl file that is
+* Step 1-3
+If necessary (should not with most Perl interpreter), edit the first (top-most) line of awstats.pl file that is
#!/usr/bin/perl
-to reflect the path were your perl interpreter is installed. Default value works for most of Unix OS, but it also might be
+to reflect the path were your Perl interpreter is installed. Default value works for most of Unix OS, but it also might be
#!/usr/local/bin/perl
With Apache for Windows and ActivePerl interpreter, it might be
#!c:/program files/activeperl/bin/perl

-* Move AWStats icon sub-directories and its content into a directory readable by your +* Step 1-4
+Move AWStats icon sub-directories and its content into a directory readable by your web server, for example /yourwwwroot/icon or /yourwwwroot/icons.

-* Copy awstats.model.conf file into a new file named awstats.virtualhostname.conf (or awstats.conf). +* Step 1-5
+Copy awstats.model.conf file into a new file named awstats.myvirtualhostname.conf. Note: When you will run AWStats, it will first look for a config file named -awstats.virtualhostname.conf, and, if not found, will look for awstats.conf.
+awstats.myvirtualhostname.conf (if not found, will look for awstats.conf).
Whatever the name you choose, this new file must be stored in
- /etc/opt/awstats or /etc/awstats or /etc or same directory than awstats.pl (so cgi-bin) for Unix/Linux users.
- same directory than awstats.pl (so cgi-bin) for Windows and other OS.
+
+* Step 1-6
Edit this new config file with your own setup :
- Change LogFile value with full path of your web server log file (You can also use a relative path from your awstats.pl directory).
- Check if LogFormat has the value "1" (it means "NCSA apache combined/ELF/XLF log format").
-- Change DirIcons parameter to reflect relative URL of icon directory.
+- Change DirIcons parameter to reflect relative path of icon directory.
- Edit SiteDomain parameter with the main domain name or the intranet -web server name used to reach the web site to analyze.
+web server name used to reach the web site to analyze (Example: www.mydomain.com).
- You can change other parameters if you want.

-Install and Setup is finished. You can jump to the Build/Update Statistics section.
+Step 1 (Install and Setup) is finished. You can jump to the Build/Update Statistics section.



-2) With IIS Server
+B) With IIS Server

-* Configure IIS to log in "Extended W3C log format" (You can still use +* Step 1-1
+Configure IIS to log in "Extended W3C log format" (You can still use your own log format but setup is easier if made like suggested). So, for this, start the IIS Snap-in, select the web site and look at its Properties. Choose W3C Extended Log Format, then Properties, then the @@ -113,49 +121,56 @@ cs(Referer)
To be sure the log format change is effective, you must stop IIS, remove all old log files, restart IIS and go to your homepage. This is an example of records you should get then in the new log file:
-2000-07-19 14:14:14 62.161.78.73 - GET / 200 1234 HTTP/1.1 Mozilla/4.0+(compatible;+MSIE+5.01;+Windows+NT+5.0) http://www.from.com/from.htm +2000-07-19 14:14:14 62.161.78.73 - GET / 200 1234 HTTP/1.1 Mozilla/4.0+(compatible;+MSIE+5.01;+Windows+NT+5.0) http://www.from.com/from.htm

-* Copy the contents of the uncompressed cgi-bin folder from your hard drive to your server's cgi-bin -directory (this includes awstats.pl, awstats.model.conf, and the lang, lib and plugins sub-directories). +* Step 1-2
+Copy the contents of the uncompressed cgi-bin folder from your hard drive to your server's cgi-bin +directory (this includes awstats.pl, awstats.model.conf, and the lang, lib and plugins sub-directories).

-* Move AWStats icon sub-directories and its content into a directory readable by your +* Step 1-3
+Move AWStats icon sub-directories and its content into a directory readable by your web server, for example C:\yourwwwroot\icon.

-* Copy awstats.model.conf file into a new file named awstats.virtualhostname.conf (or awstats.conf). +* Step 1-4
+Copy awstats.model.conf file into a new file named awstats.myvirtualhostname.conf. Note: When you will run AWStats, it will first look for a config file named -awstats.virtualhostname.conf, and, if not found, will look for awstats.conf.
+awstats.myvirtualhostname.conf (if not found, will look for awstats.conf).
Whatever the name you choose, this new file must be stored in
- same directory than awstats.pl (so cgi-bin)
+
+* Step 1-5
Edit this new config file with your own setup :
- Change LogFile value with full path of your web server log file (You can also use a relative path from your awstats.pl directory).
- Change LogFormat to value "2" (it means "IIS Extended W3C log format").
-- Change DirIcons parameter to reflect relative URL of icon directory.
+- Change DirIcons parameter to reflect relative path of icon directory.
- Edit SiteDomain parameter with the main domain name or the intranet -web server name used to reach the web site to analyze.
+web server name used to reach the web site to analyze (Example: www.mydomain.com).
- You can change other parameters if you want.

-Install and Setup is finished. You can jump to the Build/Update Statistics section.
-
+Step 1 (Install and Setup) is finished. You can jump to the Build/Update Statistics section.

-3) With other web servers
+
+
+C) With other web servers

Setup process is similar to setup for Apache or IIS.
Use LogFormat to value "3" if you have WebStar native log format.

-

Build/Update Statistics

+
+
+

Step 2 : Build/Update Statistics


-Even if AWStats allows "real-time" statistics with its "update from browser feature" (See next -section Read Statistics), you must run the update process from a scheduler frequently.
-* The first update of statistics can be made the first time manually from the command line (the first time, -process may be long :
-awstats.pl -config=virtualhostname -update
+* Step 2-1
+The first analyze/update of statistics can be made the first time manually from the command line (the first time, +process may be long) :
+awstats.pl -config=myvirtualhostname -update

-AWStats will read the config file (awstats.virtualhostname.conf, or, if not found, awstats.conf) +AWStats will read the config file awstats.myvirtualhostname.conf (or if not found, awstats.conf) and create/update its database with all summary information issued from analyzed log file.
AWStats database files are saved in directory defined by DirData parameter in config file.
When update is finished, you should get a result like this:
@@ -187,8 +202,11 @@ address in your logfile if DNSLookup See Benchmark page for more accurate information.

+* Step 2-2
+Even if AWStats allows "real-time" statistics with its "update from browser feature" (See next +section Read Statistics), you should run an update process (command is same than +first process) from a scheduler frequently.

-* Then, new updates should be made from an automatic process (command is same than first process).
You can add instructions in your crontab (Unix/Linux) or your task scheduler (for Windows), to launch frequently this Awstats update process.
For sites with:
@@ -201,17 +219,18 @@ See AWStats Benchmark page for more accurat
!!! Warning, if you don't use (or can't use with IIS) the PurgeLogFile parameter, it's very important that you don't forget to purge/rotate your log file yourself (or setup your web server to do it) -frequently. Even if AWStats never analyzes twice the same log record, the more often you clean your log file, the +frequently (You can find help for this on FAQ-SET550). +Even if AWStats never analyzes twice the same log record, the more often you clean your log file, the faster AWStats will be.

-

Read Statistics

+

Step 3 : Read Statistics


To see results of analyze, you have several solutions depending on your security policy.

-* You can build the main report, in a static HTML page, from the command line, like this :
+* First solution is to build the main reports, in a static HTML page, from the command line, like this :
perl awstats.pl -config=virtualhostname -output -staticlinks > awstats.virtualhostname.html

You can also use all other output options (each of them give you another report).