How To Setup Awstats on Abyss

 
Post new topic   Reply to topic    Aprelium Forum Index -> Tutorials
View previous topic :: View next topic  

How do you rate my Tutorial?
Good
83%
 83%  [ 10 ]
Easy
8%
 8%  [ 1 ]
Extremely Hard
8%
 8%  [ 1 ]
Total Votes : 12

Author Message
r2000
-


Joined: 27 Feb 2006
Posts: 5

PostPosted: Tue Oct 16, 2007 9:24 pm    Post subject: How To Setup Awstats on Abyss Reply with quote

First thing first, make sure you have Perl installed and setup within Abyss.

Download awstats zip file:

http://awstats.sourceforge.net/#DOWNLOAD

Step 1:

Extract the archive where you want awstats to operate from i.e. c:\Abyss\awstats or c:\awstats or c:\program files\awstats

Step 2:

Using File manager / Explorer cut all the contents from cgi-bin found in the awstats folder within wwwroot, and then paste all the cgi-bin content including folders directly into the wwwroot folder within awstats.

Step 3:

Make a copy of the existing awstats.model.conf file, and paste it somewhere to edit.

Then rename the file to awstats.yourdomain.com.conf or awstats.ip address.conf

e.g. awstats.www.mydomain.com.conf or awstats.192.168.0.1.conf

Step 4:

Move the edited .conf file back to the awstats wwwroot folder.

Step 5:

Create a directory within the awstats folder called data.

Step 6:

Modify your awstats.yourdomain.com.conf, or edit with notepad or wordpad and change the following variables:

LogFile="C:/Abyss/log/access.log" or where ever your domain log can be found - your log file location.

DirCgi="/awstats"

SiteDomain="www.yourdomain.com" or "your IP" if using IP Based System.

HostAliases="localhost www.yourdomain.com yourdomain.com 127.0.0.1 REGEX[myserver\.com$]"

or "localhost your IP 127.0.0.1 REGEX[myserver\.com$]"

DirIcons="/awstats/icon"

DirData="data" - Directory of awstats own stored logs,

e.g. DirData="c:\awstats\data"

DirIcons and DirCgi can be left as is.

AllowToUpdateStatsFromBrowser=1 - This allows you to manually update the stats when you visit the statistics.

Step 7:

Open your Abyss interface, and create an alias, here is an example:

Virtual Path = /awstats - use this default name otherwise you will have to change alot more variables, to point everything to the new alias.

Real Path = c:\awstats\wwwroot

Then apply and restart Abyss.

Step 8:

In the Abyss interface administration goto index files and add:

awstats.pl

This saves a blank page opening and also becoming a security hole to reading other files within the awstats Alias. Basically the main file which runs the statisics automatically loads as a default index file called awstats.pl

Step 9:

Restart Abyss if any changes need to be applied and goto:

Http://www.yourdomain.com/awstats

or

Http://192.168.0.1/awstats - this is if you are just using an IP based system with no domain resolution.

Step 10:

Once your stats have loaded click the update and there you go.

I thought i would write this as i keep forgetting my self "how to", lol, so im also helping my self providing this Tutorial.

Enjoy !

Creator: R2000 - 4octets.co.uk
Back to top View user's profile Send private message
njetski
-


Joined: 08 Dec 2007
Posts: 2

PostPosted: Tue Dec 18, 2007 4:40 pm    Post subject: Reply with quote

I could not get this to work.

In step 10 I went to http://www.yourdomain.com/awstats ("yourdomain" changed to the domain I have) but only the text content of the perl file appears. It does not execute. What has gone wrong?

(I send you a PM also in case you are not monitoring this thread)

/N
Back to top View user's profile Send private message
AbyssUnderground
-


Joined: 31 Dec 2004
Posts: 3855

PostPosted: Tue Dec 18, 2007 4:40 pm    Post subject: Reply with quote

njetski wrote:
I could not get this to work.

In step 10 I went to http://www.yourdomain.com/awstats ("yourdomain" changed to the domain I have) but only the text content of the perl file appears. It does not execute. What has gone wrong?

(I send you a PM also in case you are not monitoring this thread)

/N


Perl is not correctly installed if this occurs.
_________________
Andy (AbyssUnderground) (previously The Inquisitor)
www.abyssunderground.co.uk
Back to top View user's profile Send private message Visit poster's website
njetski
-


Joined: 08 Dec 2007
Posts: 2

PostPosted: Tue Dec 18, 2007 4:53 pm    Post subject: Reply with quote

AbyssUnderground wrote:
Perl is not correctly installed if this occurs.


Damn, you are fast! :)

I discovered this too a couple of minutes ago, everything works fine now. Thanks for your help.
Back to top View user's profile Send private message
anybody
-


Joined: 17 Mar 2008
Posts: 90

PostPosted: Wed Mar 26, 2008 11:49 pm    Post subject: Reply with quote

To set up awstats for more then one site without having to install awstats in more then one place. First ignore steps 7, 8, and 9 in the tutorial above and set up awstats in your default host (default host for port 80) and drop the following code into the awstats root folder.

If you try to use http://localhost/awstats/awstats.pl by it's self it'll give you an error saying, Couldn't open config file "awstats.localhost.conf", but you can specify which config file to use with a query string.

http://localhost/awstats/awstats.pl?config=www.mysite.com

The following code will parse the config file names and create links to them so you don't have to manually enter the query string.

filename: index.php
Code:
<?php
$sites = array();

$dir = '/path/to/awstats'; // change this to the path where awstats is installed
if (is_dir($dir)) {
   if ($dh = opendir($dir)) {
      while (($file = readdir($dh)) !== false) {
         if ( $file == 'awstats.model.conf')
            continue;

         if ( !eregi('^awstats[a-zA-Z0-9.]*conf', $file))
            continue;

         $sites[] = eregi_replace('.conf', '', eregi_replace('awstats.', '', $file));
      }
      closedir($dh);
   }
}

foreach ($sites as $site) {
   echo '<a href="./awstats.pl?config=' . $site . '">' . $site . '</a><br>';
}
?>
Back to top View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> Tutorials All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group