Jump to content


Photo

AWStats for Coral?


  • Please log in to reply
16 replies to this topic

#1 traxxus

traxxus

    Member

  • Member
  • PipPip
  • 80 posts
  • Location:Switzerland
  • Main OS: Windows 7

Posted 31 January 2012 - 04:51 AM

Hi

Is there an AWStats version for Uniserver "Coral"?
If yes, is an step for step tutorial available?

Thank you.

#2 BobS

BobS

    Project Helper

  • Super Moderator
  • PipPipPip
  • 334 posts
  • Location:Santiago Chile
  • Interests:Retiring, computer systems, system design, model railroads....
  • Wiki ID: BobS
  • Main OS: Windows 7

Posted 31 January 2012 - 07:32 AM

Not yet. We're still working on getting the base package stable.

Very few of the plug-ins and add-ons have been updated for use with 8-Coral, but we'll get there some day. :)

If you'd like to help, we'd be happy to have your input! PM me.

Regards,
BobS

#3 stream

stream

    Junior Member

  • Member
  • Pip
  • 20 posts
  • Main OS: Windows XP

Posted 21 February 2012 - 08:21 AM

Current version of AWStats is 7.0
http://awstats.sourceforge.net/
I try to use version 7.0 without success, I'm sure the problem is mine, but installing 6.9 and using the module provided in the WiKi I can confirm is working, so I can access it:
http://127.0.0.1/cgi-bin/awstats/awstats.pl
I just edit the config file of AWStats - awstats.conf adding the full path to Apache access log file.
LogFile="C:/UniServer/usr/local/apache2/logs/access.log"

#4 traxxus

traxxus

    Member

  • Member
  • PipPip
  • 80 posts
  • Location:Switzerland
  • Main OS: Windows 7

Posted 21 February 2012 - 08:33 AM

Thank you for the reply. I installed now AWStats 7.0 on my testserver and it runs fine.

#5 stream

stream

    Junior Member

  • Member
  • Pip
  • 20 posts
  • Main OS: Windows XP

Posted 21 February 2012 - 08:34 AM

Can you explain please and thank you!

#6 traxxus

traxxus

    Member

  • Member
  • PipPip
  • 80 posts
  • Location:Switzerland
  • Main OS: Windows 7

Posted 21 February 2012 - 08:38 AM

Sure, i write a short step by step guide now. Take some time.

#7 traxxus

traxxus

    Member

  • Member
  • PipPip
  • 80 posts
  • Location:Switzerland
  • Main OS: Windows 7

Posted 21 February 2012 - 09:12 AM

Done, i hope nothing is forgotten.

Install AWStats 7 on UniServer Coral

Step 1:
Download ActivePerl from http://www.activesta...eperl/downloads and save it to C:\UniServer\alt_diag\install_perl

Step 2:
After the download is complete, go to C:\UniServer\alt_diag\install_perl and run extract_install_perl.bat
Wait until the installation is finished.

Step 3:
Download the AWStats ZIP-package from http://awstats.sourc...e.net/#DOWNLOAD (latest stable is 7.0 today)
Choose some savepath, e.g. My Documents / Downloads

Step 4:
Open the AWStats zip-package and navigate to awstats-7.0/wwwroot/cgi-bin
Copy everything inside the cgi-bin into C:\UniServer\cgi-bin\awstats (create the folder manually)
Copy the following folders to C:\UniServer\www\awstats :
-icon
-css
-js
-classes
(they are locatet at awstats-7.0/wwwroot in the zip-package).

Step 5:
Rename the file awstats.model.conf under C:\UniServer\cgi-bin\awstats to awstats.domain.com.conf
If you use dyndns it looks like this: awstats.name.dyndns.org.conf

Step 6:
Now open the renamed conf-file with Notepad++ or another real editor.
Find the line LogFile= and change it to LogFile="C:/UniServer/usr/local/apache2/logs/access.log"
Find the line SiteDomain= and change it to SiteDomain="domain.com" (use the SAME domain as in the filename!)
Find the line DirCgi= and change it to DirCgi="/cgi-bin/awstats"
To show the icons, graphs and the css layout,
find the line DirIcons= and change it to DirIcons="http://localhost/awstats/icon"

Step 7:
If you want to update the stats immediately on the AWStats site, enable it:
Find the line AllowToUpdateStatsFromBrowser=0 and change it to AllowToUpdateStatsFromBrowser=1

Step 8:
Now open the browser and go to: http://localhost/cgi...nfig=domain.com <<- the same domain as the filename: awstats.domain.com.conf

Step 9, Security:
If you want only access from localhost, create a .htaccess file at C:\UniServer\cgi-bin\awstats\ with this content:

Order Deny,Allow
Deny from all
Allow from 127.0.0.1
Allow from ::1


If everything shows zero's, click on Update now on the top of the page. If no update now link appears, check step 7.

Updated 23Feb12 BobS

#8 BobS

BobS

    Project Helper

  • Super Moderator
  • PipPipPip
  • 334 posts
  • Location:Santiago Chile
  • Interests:Retiring, computer systems, system design, model railroads....
  • Wiki ID: BobS
  • Main OS: Windows 7

Posted 21 February 2012 - 09:28 AM

AHA!!!
So the key here is that there are two different steps.
First, install Perl. That's taken care of by following the "standard" Perl install.
THEN, install AWStats. This includes getting the config set to the proper domain and directories.

Very nice. Thanks!
Regards,
BobS

#9 stream

stream

    Junior Member

  • Member
  • Pip
  • 20 posts
  • Main OS: Windows XP

Posted 21 February 2012 - 11:18 AM

@ traxxus - Thank you.
Steps 5 to 8 is the missing ones for me.
So as I say the problem is mine :blink:
Very good and usefull tutorial. Thanks again!

#10 traxxus

traxxus

    Member

  • Member
  • PipPip
  • 80 posts
  • Location:Switzerland
  • Main OS: Windows 7

Posted 22 February 2012 - 06:40 AM

WTF! Why i can't edit my posts after some time? Bad forum settings.

I forgot an line at step 6. AWStats won't show the icons, graphs and the css layout.

Find the line DirIcons= and change it to DirIcons="http://localhost/awstats/icon"

But remind: You must copy the following folders to C:\UniServer\www\awstats :
-icon
-css
-js
-classes

(they are locatet at awstats-7.0/wwwroot in the zip-package).

#11 BobS

BobS

    Project Helper

  • Super Moderator
  • PipPipPip
  • 334 posts
  • Location:Santiago Chile
  • Interests:Retiring, computer systems, system design, model railroads....
  • Wiki ID: BobS
  • Main OS: Windows 7

Posted 23 February 2012 - 08:17 AM

I put them in for you. Hope it's correct now.

Regards,
BobS

#12 stream

stream

    Junior Member

  • Member
  • Pip
  • 20 posts
  • Main OS: Windows XP

Posted 23 February 2012 - 11:23 AM

OS: MS Windows XP SP3 Pro
Uniserver 7.1.5 Orion - working just fine
Following the steps provided here exactly w/o success!

[Thu Feb 23 18:19:21 2012] [notice] Apache/2.2.22 (Win32) PHP/5.3.10 DAV/2 configured -- resuming normal operations
[Thu Feb 23 18:19:21 2012] [notice] Server built: Jan 26 2012 14:02:59
[Thu Feb 23 18:19:21 2012] [notice] Parent: Created child process 5040
[Thu Feb 23 18:19:22 2012] [notice] Child 5040: Child process is running
[Thu Feb 23 18:19:22 2012] [notice] Child 5040: Acquired the start mutex.
[Thu Feb 23 18:19:22 2012] [notice] Child 5040: Starting 250 worker threads.
[Thu Feb 23 18:19:22 2012] [notice] Child 5040: Starting thread to listen on port 80.
[Thu Feb 23 18:19:32 2012] [error] [client 127.0.0.1] (OS 3)The system cannot find the path specified. : couldn't create child process: 720003: awstats.pl
[Thu Feb 23 18:19:32 2012] [error] [client 127.0.0.1] (OS 3)The system cannot find the path specified. : couldn't spawn child process: C:/UniServer/cgi-bin/awstats/awstats.pl



#13 Yoni

Yoni

    Support Team Member

  • Support Team
  • PipPip
  • 97 posts
  • Gender:Male
  • Main OS: Other

Posted 24 February 2012 - 08:48 PM

It worked for me without a hiccup.

Thanks for this simple guide. I'm gonna add it to the guides :)

Credits to you @ linked to this page unless you have a site that you would like me to link it to.

p.s I used my server's local IP instead of localhost otherwise it will not display any images at all from another computer in my network or from outside.

Perhaps it would be prudent to use DirIcons="http://server_ip/awstats/icon" instead of localhost e.x:
DirIcons="http://10.1.1.11/awstats/icon" (this is the server's local IP address if you are behind a firewall/static NAT).

Also, add an .htaccess by default (sorry, I'm always paranoid about unnecessary access unless explicitly allowed). In my opinion, security will always be loose if you leave it up to the end user. It is (as a recommendation) effective to always restrict access and have the end user relax it as needed (IF it is ever needed in the first place).


#------------------------------HTACCESS------------------------------------
# Server folder \cgi-bin\awstats .htaccess
# This file provides server security limiting access to the localhost only.
# Comment next four lines to deactivate. (Allow external access)
#------------------------------------------------------------------------------

Order Deny,Allow
Deny from all
Allow from 127.0.0.1
Allow from ::1

#------------------------------------------------------------------------------
# Allow access from local network (LAN)
# Uncomment next line(s) to activate. (Allow local network access)
# Add your own network/subnet if not in this range.
#------------------------------------------------------------------------------

#Allow from 10.1.1.0/16
#Allow from 10.0.0.0/16
#Allow from 192.168.1.0/24
#Allow from 192.168.0.0/24

#Basics
# /8 means you can connect from 192.x.x.x
# /16 means 192.168.x.x
# /24 means 192.168.1.x
# /32 means 192.168.1.x where x=Exact match e.x=192.168.1.10

#------------------------------------------------------------------------------
# Hiding the folder contents can be pretty useful from security point of view
# If not enabled in Uniserver Default Directives
#------------------------------------------------------------------------------
Options -Indexes
#-------------------------------------END------------------------------------

Yoni


#14 traxxus

traxxus

    Member

  • Member
  • PipPip
  • 80 posts
  • Location:Switzerland
  • Main OS: Windows 7

Posted 26 February 2012 - 07:17 AM

@Yoni

Thank you. I use only localhost (not the server IP) for security. Like you said, with localhost you can only access from the webserver himself. And the adding of an htaccess is descriped in step 9 already.

:)

#15 Yoni

Yoni

    Support Team Member

  • Support Team
  • PipPip
  • 97 posts
  • Gender:Male
  • Main OS: Other

Posted 28 February 2012 - 11:45 PM

Ok now I could use some help to make me understand and fix this for everyone else in the long run.

AWStats did not find any valid log lines that match your LogFormat parameter, in the 50th first non commented lines read of your log.
Your log file D:/UniServer/usr/local/apache2/logs/access.log must have a bad format or LogFormat parameter setup does not match this format.

Your AWStats LogFormat parameter is: 1
This means each line in your web server log file need to have "combined log format" like this:
111.22.33.44 - - [10/Jan/2001:02:14:14 +0200] "GET / HTTP/1.1" 200 1234 "http://www.fromserve...r.com/from.htm" "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)"

And this is an example of records AWStats found in your log file (the record number 50 in your log):
127.0.0.1 - - [28/Feb/2012:23:07:32 -0500] "GET /awstats/icon/other/button.gif HTTP/1.1" 200 147


Setup ('D:/UniServer/cgi-bin/awstats/awstats.unlockforus.com.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).


If I run it on a test Uniserver (everything runs with Administrator privileges) it works. So my believe is that there is a permission issue in the production server...?

Yoni


#16 traxxus

traxxus

    Member

  • Member
  • PipPip
  • 80 posts
  • Location:Switzerland
  • Main OS: Windows 7

Posted 01 March 2012 - 01:10 PM

Ok now I could use some help to make me understand and fix this for everyone else in the long run.
If I run it on a test Uniserver (everything runs with Administrator privileges) it works. So my believe is that there is a permission issue in the production server...?


In the awstats config change the line `logformat` (cant remind the exact name) from 1 to 4.

#17 Yoni

Yoni

    Support Team Member

  • Support Team
  • PipPip
  • 97 posts
  • Gender:Male
  • Main OS: Other

Posted 01 March 2012 - 02:56 PM

In the awstats config change the line `logformat` (cant remind the exact name) from 1 to 4.

Thank you. I should've read the config file options. :)

Yoni





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users