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
76%
 76%  [ 10 ]
Easy
15%
 15%  [ 2 ]
Extremely Hard
7%
 7%  [ 1 ]
Total Votes : 13

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
blaineca
-


Joined: 05 Dec 2018
Posts: 9

PostPosted: Wed Oct 23, 2019 4:34 am    Post subject: Reply with quote

I just get error 403 forbiden
Back to top View user's profile Send private message
admin
Site Admin


Joined: 03 Mar 2002
Posts: 960

PostPosted: Sat Oct 26, 2019 11:14 am    Post subject: Reply with quote

blaineca wrote:
I just get error 403 forbiden


Error 403 is probably because you are using http://localhost which does not match with any of your declared hosts.

You should probably replace http://localhost in the tutorial URLs with your actual domain name or IP address.
_________________
Follow @abyssws on Twitter
Subscribe to our newsletter
_________________
Forum Administrator
Aprelium - https://aprelium.com
Back to top View user's profile Send private message
blaineca
-


Joined: 05 Dec 2018
Posts: 9

PostPosted: Sun Nov 03, 2019 9:17 pm    Post subject: error 500 Reply with quote

when I click on "update now" I get a screen with error 500

any ideas?
Back to top View user's profile Send private message
admin
Site Admin


Joined: 03 Mar 2002
Posts: 960

PostPosted: Wed Nov 06, 2019 4:18 pm    Post subject: Re: error 500 Reply with quote

blaineca wrote:
when I click on "update now" I get a screen with error 500

any ideas?


You need to provide us with more context about the error. What is its exact URL? Error 500 usually means that the script has reported an error. The error should be logged inside the cgi.log file inside the log subdirectory.

Copying/pasting that error report in your reply may help too.
_________________
Follow @abyssws on Twitter
Subscribe to our newsletter
_________________
Forum Administrator
Aprelium - https://aprelium.com
Back to top View user's profile Send private message
blaineca
-


Joined: 05 Dec 2018
Posts: 9

PostPosted: Thu Nov 07, 2019 2:25 am    Post subject: Reply with quote

Here is a snippet of the log




[02/Nov/2019:17:47:15 -0600] CGI: [C:\Perl64\bin\perl.exe awstats.pl ] URI: /awstats/awstats.pl?framename=mainright&update=1 Broken pipe
[02/Nov/2019:17:47:53 -0600] CGI: [C:\Perl64\bin\perl.exe awstats.pl ] URI: /awstats/awstats.pl?framename=mainright&update=1 Broken pipe
[02/Nov/2019:17:50:54 -0600] CGI: [C:\Perl64\bin\perl.exe awstats.pl ] URI: /awstats/awstats.pl?framename=mainright&update=1 Broken pipe
[02/Nov/2019:18:05:01 -0600] CGI: [C:\Perl64\bin\perl.exe awstats.pl ] URI: /awstats/awstats.pl?framename=mainright&update=1 Broken pipe
[03/Nov/2019:12:37:31 -0700] CGI: [C:\Perl64\bin\perl.exe awstats.pl ] URI: /awstats/awstats.pl?framename=mainright&update=1 Broken pipe
[03/Nov/2019:12:42:50 -0700] CGI: [C:\Perl64\bin\perl.exe awstats.pl ] URI: /awstats/awstats.pl?framename=mainright&update=1 Broken pipe
[03/Nov/2019:12:51:42 -0700] CGI: [C:\Perl64\bin\perl.exe awstats.pl ] URI: /awstats/awstats.pl?framename=mainright&update=1 Broken pipe
[03/Nov/2019:12:52:41 -0700] CGI: [C:\Perl64\bin\perl.exe awstats.pl ] URI: /awstats/awstats.pl?framename=mainright&update=1 Broken pipe
[03/Nov/2019:12:52:58 -0700] CGI: [C:\Perl64\bin\perl.exe awstats.pl ] URI: /awstats/awstats.pl?month=11&year=2019&output=main&config=weatheryyc.com&framename=mainright&update=1 Broken pipe
[03/Nov/2019:12:53:44 -0700] CGI: [C:\Perl64\bin\perl.exe awstats.pl ] URI: /awstats/awstats.pl?month=11&year=2019&output=main&config=weatheryyc.com&framename=mainright&update=1 Broken pipe
[03/Nov/2019:12:58:37 -0700] CGI: [C:\Perl64\bin\perl.exe awstats.pl ] URI: /awstats/awstats.pl?month=11&year=2019&output=main&config=weatheryyc.com&framename=mainright&update=1 Broken pipe
Back to top View user's profile Send private message
devastator82
-


Joined: 10 Mar 2006
Posts: 21
Location: Lithuania

PostPosted: Thu Nov 07, 2019 3:59 pm    Post subject: Reply with quote

Looks like something wrong with a perl installation.
I use strawberry perl and no errors with awstats.
Back to top View user's profile Send private message
blaineca
-


Joined: 05 Dec 2018
Posts: 9

PostPosted: Fri Nov 08, 2019 3:41 am    Post subject: Reply with quote

I have removed active perl and installed strawberry. same results.
Back to top View user's profile Send private message
devastator82
-


Joined: 10 Mar 2006
Posts: 21
Location: Lithuania

PostPosted: Fri Nov 08, 2019 9:10 am    Post subject: Reply with quote

blaineca wrote:
I have removed active perl and installed strawberry. same results.


Do you use plugins from cpan?
or antivirus software maybe blocking perl.
Back to top View user's profile Send private message
devastator82
-


Joined: 10 Mar 2006
Posts: 21
Location: Lithuania

PostPosted: Fri Nov 08, 2019 12:44 pm    Post subject: Reply with quote

Another thing what i done.
Just moved cgi-bin contents fo awstats root folder.
Renamed awstats.pl to index.pl. Renamed config to index.conf
And some config adjustments.
I use only two external cpan modules (ipfree and xwhois).

Also i have saved this tutorial webpage (can't remember from where).
https://drive.google.com/file/d/1dr8-0TRZXh3T7GvCw4uJEQ0RBvf3F-wJ/view?usp=sharing
Back to top View user's profile Send private message
blaineca
-


Joined: 05 Dec 2018
Posts: 9

PostPosted: Sun Nov 17, 2019 4:34 am    Post subject: Reply with quote

I have tried everything I can think of and the log still says "Broken Pipe"
Back to top View user's profile Send private message
admin
Site Admin


Joined: 03 Mar 2002
Posts: 960

PostPosted: Tue Nov 19, 2019 11:36 am    Post subject: Reply with quote

blaineca wrote:
I have tried everything I can think of and the log still says "Broken Pipe"


Please contact our support by email for a feaster exchange to diagnose the issue.
_________________
Follow @abyssws on Twitter
Subscribe to our newsletter
_________________
Forum Administrator
Aprelium - https://aprelium.com
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