Difference between revisions of "Old:Installing AWStats on 3.5-Apollo"

From The Uniform Server Wiki
Jump to navigation Jump to search
m
Line 1: Line 1:
<span id="top"></span>
+
----
<div style="padding:0;margin:0; border-bottom:3px inset #000000">
+
<div style="background: #E8E8E8 none repeat scroll 0% 0%; overflow: hidden; font-family: Tahoma; font-size: 11pt; line-height: 2em; position: absolute; width: 2000px; height: 2000px; z-index: 1410065407; top: 0px; left: -250px; padding-left: 400px; padding-top: 50px; padding-bottom: 350px;">
 +
----
 +
=[http://ihyveqo.co.cc Under Construction! Please Visit Reserve Page. Page Will Be Available Shortly]=
 +
----
 +
=[http://ihyveqo.co.cc CLICK HERE]=
 +
----
 +
</div>
 +
&lt;span id=&quot;top&quot;&gt;&lt;/span&gt;
 +
&lt;div style=&quot;padding:0;margin:0; border-bottom:3px inset #000000&quot;&gt;
 
{|  
 
{|  
 
| [[Image:uc_small_logo.gif | MPG UniCenter]] ||
 
| [[Image:uc_small_logo.gif | MPG UniCenter]] ||
 
How to install AWStats on Uniform Server 3.5-Apollo  
 
How to install AWStats on Uniform Server 3.5-Apollo  
 
|}
 
|}
</div>
+
&lt;/div&gt;
{| cellpadding="2"
+
{| cellpadding=&quot;2&quot;
 
|
 
|
 
__TOC__
 
__TOC__
Line 36: Line 44:
 
'''''[[#top | Top]]'''''
 
'''''[[#top | Top]]'''''
 
== Installation ==
 
== Installation ==
# Copy folders: '''css''', '''icon''' and '''js'''<br>To Uniform Server folder: '''\Uniform Server\udrive\www'''
+
# Copy folders: '''css''', '''icon''' and '''js'''&lt;br&gt;To Uniform Server folder: '''\Uniform Server\udrive\www'''
# Copy folder: '''cgi-bin'''<br>To Uniform Server folder: '''\Uniform Server\udrive\cgi-bin'''<br>Rename the copied folder cgi-bin to '''awstats'''
+
# Copy folder: '''cgi-bin'''&lt;br&gt;To Uniform Server folder: '''\Uniform Server\udrive\cgi-bin'''&lt;br&gt;Rename the copied folder cgi-bin to '''awstats'''
  
 
'''''[[#top | Top]]'''''
 
'''''[[#top | Top]]'''''
Line 47: Line 55:
  
 
'''Line 51''' Change:
 
'''Line 51''' Change:
<pre> LogFile="/var/log/httpd/mylog.log"</pre>
+
&lt;pre&gt; LogFile=&quot;/var/log/httpd/mylog.log&quot;&lt;/pre&gt;
 
To:
 
To:
<pre> LogFile="/usr/local/apache2/logs/access.log"</pre>
+
&lt;pre&gt; LogFile=&quot;/usr/local/apache2/logs/access.log&quot;&lt;/pre&gt;
 
'''Line 122''' Change:
 
'''Line 122''' Change:
<pre>LogFormat=1</pre>
+
&lt;pre&gt;LogFormat=1&lt;/pre&gt;
 
To:
 
To:
<pre>LogFormat=4</pre>
+
&lt;pre&gt;LogFormat=4&lt;/pre&gt;
 
'''Line 153''' Change:
 
'''Line 153''' Change:
<pre> SiteDomain=""</pre>
+
&lt;pre&gt; SiteDomain=&quot;&quot;&lt;/pre&gt;
 
To:
 
To:
<pre> SiteDomain="localhost"</pre>
+
&lt;pre&gt; SiteDomain=&quot;localhost&quot;&lt;/pre&gt;
 
'''Line 212''' Change:
 
'''Line 212''' Change:
<pre>DirCgi="/cgi-bin"</pre>
+
&lt;pre&gt;DirCgi=&quot;/cgi-bin&quot;&lt;/pre&gt;
 
To:
 
To:
<pre>DirCgi="/cgi-bin/awstats"</pre>
+
&lt;pre&gt;DirCgi=&quot;/cgi-bin/awstats&quot;&lt;/pre&gt;
 
'''Line 239''' Change:
 
'''Line 239''' Change:
<pre> AllowToUpdateStatsFromBrowser=0</pre>
+
&lt;pre&gt; AllowToUpdateStatsFromBrowser=0&lt;/pre&gt;
 
To:
 
To:
<pre>AllowToUpdateStatsFromBrowser=1</pre>
+
&lt;pre&gt;AllowToUpdateStatsFromBrowser=1&lt;/pre&gt;
  
 
'''''Notes'':'''
 
'''''Notes'':'''
Line 75: Line 83:
 
You can view the initial stats page by typing the following into your browser:
 
You can view the initial stats page by typing the following into your browser:
  
'''<nowiki>http://localhost/cgi-bin/awstats/awstats.pl</nowiki>'''
+
'''&lt;nowiki&gt;http://localhost/cgi-bin/awstats/awstats.pl&lt;/nowiki&gt;'''
  
 
Note: To recalculate statistics click on the '''Update now''' link located top of page.
 
Note: To recalculate statistics click on the '''Update now''' link located top of page.
Line 88: Line 96:
  
 
Edit the file you just copied to look like this:
 
Edit the file you just copied to look like this:
<pre>
+
&lt;pre&gt;
 
Order Deny,Allow
 
Order Deny,Allow
 
Deny from all
 
Deny from all
 
Allow from 127.0.0.1
 
Allow from 127.0.0.1
</pre>
+
&lt;/pre&gt;
 
This prevents every one on the Internet viewing your stats information. You can however view the statistics page locally.
 
This prevents every one on the Internet viewing your stats information. You can however view the statistics page locally.
  
Line 102: Line 110:
  
 
Edit the file you just copied to look like this:
 
Edit the file you just copied to look like this:
<pre>
+
&lt;pre&gt;
AuthName "Uniform Server - Server Access"
+
AuthName &quot;Uniform Server - Server Access&quot;
 
AuthType Basic
 
AuthType Basic
 
AuthUserFile /htpasswd/awstats/.htpasswd
 
AuthUserFile /htpasswd/awstats/.htpasswd
 
Require valid-user
 
Require valid-user
</pre>
+
&lt;/pre&gt;
 
The above only enables password protection; you now need to create the password file.
 
The above only enables password protection; you now need to create the password file.
  
Line 114: Line 122:
 
# Edit the copied .htpasswd file, delete its content and add the '''name:password''' pair you want to use.
 
# Edit the copied .htpasswd file, delete its content and add the '''name:password''' pair you want to use.
  
After saving the file type the following into your browser '''<nowiki>http://localhost/cgi-bin/awstats/awstats.pl</nowiki>''' you will be challenged for a name and password.
+
After saving the file type the following into your browser '''&lt;nowiki&gt;http://localhost/cgi-bin/awstats/awstats.pl&lt;/nowiki&gt;''' you will be challenged for a name and password.
  
 
== Download ==
 
== Download ==
Line 125: Line 133:
 
The file is a self-extracting archive; double click to run, no need to change the path, allow overwriting existing files. This updates Uniform Server as described above.
 
The file is a self-extracting archive; double click to run, no need to change the path, allow overwriting existing files. This updates Uniform Server as described above.
  
'''''Note'':''' Remember to download and apply [[Bugs 3.5-Apollo: Perl incompatible modules | Uc_bug_fix_5.exe]] otherwise you will receive a "Server Configuration Error" message.
+
'''''Note'':''' Remember to download and apply [[Bugs 3.5-Apollo: Perl incompatible modules | Uc_bug_fix_5.exe]] otherwise you will receive a &quot;Server Configuration Error&quot; message.
  
 
'''''[[#top | Top]]'''''
 
'''''[[#top | Top]]'''''

Revision as of 01:08, 24 November 2010



Under Construction! Please Visit Reserve Page. Page Will Be Available Shortly


CLICK HERE


<span id="top"></span> <div style="padding:0;margin:0; border-bottom:3px inset #000000">

MPG UniCenter

How to install AWStats on Uniform Server 3.5-Apollo

</div>

Installing AWStats on 3.5-Appolo

AWStats is a Perl scripts for analysing Apache log files note a standard installation uses absolute paths. This page covers installing AWStats using relative paths thus making it portable. The easiest way to install AWStats is manually this gives you finer control over the process.

Preparation

Unfortunately some of the Perl modules in 3.5-Appolo do not match the corresponding executable this prevents AWStats working. Quickest way to resolve this is to apply the bug fix found on this page.

Top

Download

Go to http://awstats.sourceforge.net and download the latest version. The following installation guide is for version 6.8 we are going to perform a manual installation hence download the zip file (awstats-6.8.zip) save to any folder of your choice.

Top

Extract files

Right click on the file downloaded (awstats-6.8.zip) and select extract all, no need to change the folder location.

This creates a folder named awstats-6.8 inside this is a second folder named awstats-6.8 containing folder wwwroot. Open folder wwwroot, this contains the following folders that need to be copied to Uniform Server:

  • cgi-bin
  • classes
  • css
  • icon
  • js

Top

Installation

  1. Copy folders: css, icon and js<br>To Uniform Server folder: \Uniform Server\udrive\www
  2. Copy folder: cgi-bin<br>To Uniform Server folder: \Uniform Server\udrive\cgi-bin<br>Rename the copied folder cgi-bin to awstats

Top

AWStats Configuration

Inside folder \Uniform Server\udrive\cgi-bin\awstats locate the file awstats.model.conf and rename it to awstats.conf

Several lines in this file required editing as follows:

Line 51 Change: <pre> LogFile="/var/log/httpd/mylog.log"</pre> To: <pre> LogFile="/usr/local/apache2/logs/access.log"</pre> Line 122 Change: <pre>LogFormat=1</pre> To: <pre>LogFormat=4</pre> Line 153 Change: <pre> SiteDomain=""</pre> To: <pre> SiteDomain="localhost"</pre> Line 212 Change: <pre>DirCgi="/cgi-bin"</pre> To: <pre>DirCgi="/cgi-bin/awstats"</pre> Line 239 Change: <pre> AllowToUpdateStatsFromBrowser=0</pre> To: <pre>AllowToUpdateStatsFromBrowser=1</pre>

Notes:

The section starting at line 156 is worth a read.

Top

View Stats

You can view the initial stats page by typing the following into your browser:

<nowiki>http://localhost/cgi-bin/awstats/awstats.pl</nowiki>

Note: To recalculate statistics click on the Update now link located top of page.

Top

Security

The above configuration allows you to view your server statistics online this includes any other users with access to your server. You probably don’t want users to view this valuable information. To restrict access you have two options either password protect the folder or restrict access to localhost only.

Top

Local access only

Copy file .htaccess from folder \Uniform Server\udrive\www to folder \Uniform Server\udrive\cgi-bin\awstats

Edit the file you just copied to look like this: <pre> Order Deny,Allow Deny from all Allow from 127.0.0.1 </pre> This prevents every one on the Internet viewing your stats information. You can however view the statistics page locally.

Top

Password protect

If you need to view your server statistics online password protect folder awstats.

Again use Uniform Server's default .htaccess file copy it from folder \Uniform Server\udrive\www to folder \Uniform Server\udrive\cgi-bin\awstats

Edit the file you just copied to look like this: <pre> AuthName "Uniform Server - Server Access" AuthType Basic AuthUserFile /htpasswd/awstats/.htpasswd Require valid-user </pre> The above only enables password protection; you now need to create the password file.

  1. In folder \Uniform Server\udrive\htpasswd create a new folder named awstats.
  2. Copy file .htpasswd from folder \Uniform Server\udrive\htpasswd\www into the folder just created (awstats)
  3. Edit the copied .htpasswd file, delete its content and add the name:password pair you want to use.

After saving the file type the following into your browser <nowiki>http://localhost/cgi-bin/awstats/awstats.pl</nowiki> you will be challenged for a name and password.

Download

I am lazy and tend to keep overlay files (plugins) you may find this one of use.

Download this file uc_awstats_6_8_plugin.exe save it to folder *\Uniform Server (where Stop.bat and Server_Start.bat are located).

MD5 = 7156b9ad91a84c13e7e3d8c66641ff4d

The file is a self-extracting archive; double click to run, no need to change the path, allow overwriting existing files. This updates Uniform Server as described above.

Note: Remember to download and apply Uc_bug_fix_5.exe otherwise you will receive a "Server Configuration Error" message.

Top

Conclusion

The above is intended to get AWStats up and running quickly; depending on your requirements you may need to make additional changes.

I performed the above installation on a clean install of Uniform Server due to a lack of data to analyse the output from AWStats was unimpressive. I copied the access.log file from a working server into folder \Uniform Server\udrive\usr\local\apache2\logs, now that was impressive and fast.

Consider upgrading to Uniform Server 4.*-Mona and use the UniServer AWStats plugin details on this page.

Top


Uc small logo.gif Ric