DirectAdmin Forums

Go Back   DirectAdmin Forums > Modifications / Add-ons > 3rd Party Software

Reply
 
Thread Tools Display Modes
  #1  
Old 07-10-2004, 05:06 AM
fusionictnl's Avatar
fusionictnl fusionictnl is offline
Verified User
 
Join Date: Jun 2004
Location: Netherlands
Posts: 1,055
Exclamation AwStats plugin for DA v2.1.8

NOTE: This plugin appears to be unsupported; the author hasn't posted on the DirectAdmin forums for over 15 months.

This Plugin will update all awstats.pl to the current awstats version

AwStats DA Plugin : v.2.1.9 09-Jan-2006 (GMT+1)
Awstats Version: (Auto-Update)

Click this link if you want to donate and maybe it will get better it's STILL free

ALWAYS USE LATEST DA RELEASE - EXTRA FEATURES AREN'T ADDED ANYMORE, SO DON'T REQUEST

Use the above url in your DA Plugin Management to install (Admin-Level).

On user-level users, can activate awstats on their domain through the control panel.
It creates a /awstats for the specified domain. So you can browse to: http://www.yourdomain.com/awstats
and see the statistics.

Admin-level, choose wich users can access awstats plugin.

It features password protection and all other awstats functions.

Let me know if it works or if there are any problems

If you want to install awstats to all domains, login as root on your machine and run: /usr/local/directadmin/plugins/awstats/hooks/alldomains.php

For use in a Cron
Add to cron: /usr/local/directadmin/plugins/awstats/hooks/cgi-bin/awstats_updateall.pl now -awstatsprog=/usr/local/directadmin/plugins/awstats/hooks/cgi-bin/awstats.pl

*OR*


Replace:-

10 0 * * * root echo 'action=tally&value=all' >> /usr/local/directadmin/data/task.queue

With:-

10 0 * * * root /usr/local/directadmin/plugins/awstats/hooks/cgi-bin/awstats_updateall.pl now -awstatsprog=/usr/local/directadmin/plugins/awstats/hooks/cgi-bin/awstats.pl && echo 'action=tally&value=all' >> /usr/local/directadmin/data/task.queue



I Have added an option (ver > 1.4) to the awstats_updateall.pl: -rotated=[size]

This size is in MB's and this will let the update only update the log's bigger as this SIZE So : -rotated 99 will only update logs bigger as 99 MB. (For example da logrotate size)


I don't recommend upgrading the awstats.pl yourselfs as the original has a minor bug/feature in it, that would let you read any stats for any apache log file. (This is a customized version of AwStats and a customized version of the awstats_updateall.pl with some extra's in it).

As of 2.0.5 there is an other tool added in the hooks: awstatsinstall.php (heavily documented). This can be used to install/update/check the awstats installations of the plugin! Thx to: Cal Evans


Automaticaly give access to stats to new users

# cd /usr/local/directadmin/scripts/custom
# vi user_create_post.sh

Add the following to the new file or add the line if exists:

Quote:

#!/bin/sh
echo $username >> /usr/local/directadmin/plugins/awstats/hooks/permissions.txt
# save the file VI command ( 'ESC' then ':' then 'wq!' )
# chmod a+x user_create_post.sh

This should now automaticaly add new users to the permissions file!


Use /usr/local/directadmin/plugins/awstats/update/update.sh to update your awstats, to the latest version!!

Some people asked if they could donate something to the good of me I created the plugin for myself and are sharing it among others of the DA community. So please don't feel like you'll have to donate. This is just for the people that want to thank me for it! And offcourse I appreciate it, as well as you don't.


Good luck!

Last edited by fusionictnl; 01-09-2006 at 11:55 AM.
Reply With Quote
  #2  
Old 07-11-2004, 05:43 AM
fusionictnl's Avatar
fusionictnl fusionictnl is offline
Verified User
 
Join Date: Jun 2004
Location: Netherlands
Posts: 1,055
v. 0.2

Updated v0.2:

*- History files will be written to /etc/awstats (faster reporting)
*- Seperate AwStats config files will be generated to /etc/awstats for futere settings (per user).
Reply With Quote
  #3  
Old 07-11-2004, 12:08 PM
fusionictnl's Avatar
fusionictnl fusionictnl is offline
Verified User
 
Join Date: Jun 2004
Location: Netherlands
Posts: 1,055
Updated v0.3:

*- Users with multiple domains can choose wich domain to show.

Last edited by fusionictnl; 07-11-2004 at 12:59 PM.
Reply With Quote
  #4  
Old 07-11-2004, 01:02 PM
fusionictnl's Avatar
fusionictnl fusionictnl is offline
Verified User
 
Join Date: Jun 2004
Location: Netherlands
Posts: 1,055
Updated v0.4:

*- Plugin name is correct.
*- Admin/Resellers can view his/her own domains on User Level
*- Multiple domain bug (users could access every domain stats) fixed.
*- Script name is changed to awstats.tar.gz, old update doesn't work

Let me know if there are things that don't work or should be added!
Reply With Quote
  #5  
Old 07-11-2004, 02:00 PM
jmstacey's Avatar
jmstacey jmstacey is offline
Verified User
 
Join Date: Feb 2004
Location: Colorado
Posts: 4,111
Stats for domains under admin user are not working. here is the error message.
----- awstats 6.2 (build 1.761) (c) 2000-2004 Laurent Destailleur ----- awstats is a free web server logfile analyzer to show you advanced web statistics. awstats comes with ABSOLUTELY NO WARRANTY. It's a free software distributed with a GNU General Public License (See LICENSE file for details). Syntax: awstats.pl -config=virtualhostname [options] This runs awstats in command line to update statistics of a web site, from the log file defined in AWStats config file (with -update option), or build a HTML report (with -output option). First, awstats tries to read awstats.virtualhostname.conf as the config file. If not found, awstats tries to read awstats.conf Note 1: Config files (awstats.virtualhostname.conf or awstats.conf) must be in /etc/awstats, /usr/local/etc/awstats, /etc or same directory than awstats.pl script file. Note 2: If AWSTATS_FORCE_CONFIG environment variable is .......... and it just goes on a page or so more.
So it appears it is not executing just reading the file.

also, something wrong with the code used in the plugin link that displayed on the user levels etc when DA is secured. The error message is about a part of the page is not secure, only change was this plugin

Hope this helps a little.
__________________
Just do what it takes to make it happen
Reply With Quote
  #6  
Old 07-11-2004, 02:09 PM
flumps flumps is offline
Verified User
 
Join Date: Dec 2003
Posts: 108
would just like to say ive installed this on my box and it works a treat, nice work dude
Reply With Quote
  #7  
Old 07-11-2004, 08:18 PM
thuskey's Avatar
thuskey thuskey is offline
Verified User
 
Join Date: Apr 2004
Location: St Louis
Posts: 141
Does awstats need to be preinstalled on the server? I do not have awstats preinstalled. After running the install, the link appeared, I clicked it, and it went to a standard enhanced template page which was blank in the content area. I've gone as far as adding an echo "AwStats"; at the top of the index.html file, which now is the only thing that appears in the content area.

I'm also playing with a plugin of my own which now has a bolded link, caused by your <B>AwStats Statistics<B> syntax in the user_txt.html file which should read <B>AwStats Statistics</B> enstead.
__________________
Travis Huskey
http://www.travishuskey.com

Independent Associate
PrePaid Legal Services, Inc.
Reply With Quote
  #8  
Old 07-11-2004, 08:47 PM
thuskey's Avatar
thuskey thuskey is offline
Verified User
 
Join Date: Apr 2004
Location: St Louis
Posts: 141
I answered my own question. No you do not have to have awstats preinstalled.

I did however make the following changes.

1)in file user_txt.html added closing slash in bold tags.

<B>AwStats Statistics</B>

2)in file index.html

#$dir=$_ENV["DOCUMENT_ROOT"]."/../hooks";
$dir="/usr/local/directadmin/plugins/awstats/hooks";

when echoing $dir on my server, I found the value for $_ENV["DOCUMENT_ROOT"] is always null. Maybe it is different on other servers.

all in all, cool plugin, I hope this sparks others to start developing a few more plugins of their own
__________________
Travis Huskey
http://www.travishuskey.com

Independent Associate
PrePaid Legal Services, Inc.
Reply With Quote
  #9  
Old 07-11-2004, 11:10 PM
fusionictnl's Avatar
fusionictnl fusionictnl is offline
Verified User
 
Join Date: Jun 2004
Location: Netherlands
Posts: 1,055
Quote:
...... also, something wrong with the code used in the plugin link that displayed on the user levels etc when DA is secured. The error message is about a part of the page is not secure, only change was this plugin
Link changed

Look at your URL when you open op the plugin. Does it say something like ?domain=... ?

Did you first delete your plugin completely (because you already had one installed?) If not do so and check /usr/local/directadmin/plugins if there isn't any trash in it (probaly not). And then re-install it. (maybe the last update fixed some things for you, I hope).


Quote:
1)in file user_txt.html added closing slash in bold tags.
Changed

Quote:
$dir="/usr/local/directadmin/plugins/awstats/hooks";
Changed, probaly less problems, but I don't know if everybody has da in /usr/local/directadmin

You can just Update your plugin. It should then be version 0.5
Reply With Quote
  #10  
Old 07-11-2004, 11:28 PM
jmstacey's Avatar
jmstacey jmstacey is offline
Verified User
 
Join Date: Feb 2004
Location: Colorado
Posts: 4,111
Whenever I try accessing the user level I get a warning message still.
"This page contains both secure and nonsecure content...."
It is because of the small image you have in it since its not on a secure server

I did uninstall and delete the old version before installing the new one but stats are not working on any accounts. Still displaying the same message.
All user urls are CMD_PLUGINS/awstats
thats it, so it looks like its not putting in the domain correctly, or displaying the list to select multiple domains from depending on how you did it.
__________________
Just do what it takes to make it happen
Reply With Quote
  #11  
Old 07-12-2004, 12:12 AM
fusionictnl's Avatar
fusionictnl fusionictnl is offline
Verified User
 
Join Date: Jun 2004
Location: Netherlands
Posts: 1,055
You're running Da on HTTPS

You can fix it by changing the user....txt file in /usr/local/directadmin/plugins/awstats/hooks/

Removing the <img src......>
Reply With Quote
  #12  
Old 07-12-2004, 03:53 AM
thuskey's Avatar
thuskey thuskey is offline
Verified User
 
Join Date: Apr 2004
Location: St Louis
Posts: 141
Quote:
Originally posted by fusionictnl

Changed, probaly less problems, but I don't know if everybody has da in /usr/local/directadmin
I found a more proper fix for my DOCUMENT_ROOT problem. I changed the line back to the way you had it and modified the association line at the top of the index.html file to look like this.

#!/usr/local/bin/php -c /usr/local/lib/php.ini
.
.
$dir=$_ENV["DOCUMENT_ROOT"]."/../hooks";
__________________
Travis Huskey
http://www.travishuskey.com

Independent Associate
PrePaid Legal Services, Inc.
Reply With Quote
  #13  
Old 07-12-2004, 04:23 AM
fusionictnl's Avatar
fusionictnl fusionictnl is offline
Verified User
 
Join Date: Jun 2004
Location: Netherlands
Posts: 1,055
Thx will be added next release

Some points I'm going to add:

-- Let users choose if they want to have a cron job and export it to a defined path for ex. http://www.xxx.xxx/awstats
This way all links will work and frames (Standard) can be used.
The stats in the CP will then be removed, it will only be for the statistics options.

-- Users can modify it's config, for example the plugins DNS Lookups etc.

-- Resellers could choose wich users can change the options or add cronjobs. (No cronjobs will disable it for the user)

-- Resellers can create a default configuration file, wich will be used for their users.
This way if some AwStats plugins are to heavy load for the server, the reseller can define a standard configuration file and deny users from modifying it's own configuration file.

Fixes:

- ENV: Document root (prev. topic).
- HTTPS problem, fixing by using the local picture's instead of http://www.awstats.org

If you have any comments on above features or how it should be implemented on a better way, please tell me


Last edited by fusionictnl; 07-12-2004 at 04:30 AM.
Reply With Quote
  #14  
Old 07-12-2004, 11:52 AM
hostpc.com's Avatar
hostpc.com hostpc.com is offline
Verified User
 
Join Date: Aug 2003
Location: Schenectady, NY
Posts: 1,181
Dude, THANK YOU!

Tho this only reports for the current log cycle, it's gonna be a blessing for some of my customers that can't stand webalizer. Awstats rocks (as far as free stats goes).

There are some issues however. I tried to click on
Referers: Refering sites and got this error:


Unable to execute your request

Details

That plugin does not exit for the specified User Level


Does not exit? Exist maybe? Is that a seperate plugin? The item links to: http://hostpc.com:2222/CMD_PLUGINS/a...ererpages.html

Any thoughts?

Thanks again!

Joe
__________________
Joseph Mack http://www.hostpc.com Since November 1998
DirectAdmin Hosting and Dedicated Servers Since August 2003
Reply With Quote
  #15  
Old 07-12-2004, 11:16 PM
fusionictnl's Avatar
fusionictnl fusionictnl is offline
Verified User
 
Join Date: Jun 2004
Location: Netherlands
Posts: 1,055
There is a problem with the links, because these require some static page's or the awstats.pl I'm working on it.

I'm testing 2 things:

- Static page's generated by a cron
- Put the awstats.pl in each users ./cgi-bin/ dir.

Probaly for the next release I will take the second way Always the easiest way, so you guys and my customers can use AwStats to the fullest a.s.a.p.

Scripts from AwStats that generate the static pages, doesn't have enough configuration options. So that's why I'll use the awstats.pl instead of static reports. This way The plugin doesn't have to change to much on the system


Last edited by fusionictnl; 07-12-2004 at 11:19 PM.
Reply With Quote
  #16  
Old 07-13-2004, 07:05 AM
hostpc.com's Avatar
hostpc.com hostpc.com is offline
Verified User
 
Join Date: Aug 2003
Location: Schenectady, NY
Posts: 1,181
tried copying off awstats.pl to a users cgi-bin.... wasn't that easy, but maybe I missed a step.

Just FYI.
__________________
Joseph Mack http://www.hostpc.com Since November 1998
DirectAdmin Hosting and Dedicated Servers Since August 2003
Reply With Quote
  #17  
Old 07-13-2004, 09:27 AM
fusionictnl's Avatar
fusionictnl fusionictnl is offline
Verified User
 
Join Date: Jun 2004
Location: Netherlands
Posts: 1,055
This will be automaticaly in the next release

You don't have to do anything right now
Reply With Quote
  #18  
Old 07-13-2004, 09:59 AM
hostpc.com's Avatar
hostpc.com hostpc.com is offline
Verified User
 
Join Date: Aug 2003
Location: Schenectady, NY
Posts: 1,181
my users are giddy with anticipation
__________________
Joseph Mack http://www.hostpc.com Since November 1998
DirectAdmin Hosting and Dedicated Servers Since August 2003
Reply With Quote
  #19  
Old 07-13-2004, 10:31 AM
fusionictnl's Avatar
fusionictnl fusionictnl is offline
Verified User
 
Join Date: Jun 2004
Location: Netherlands
Posts: 1,055
It's almost finished the second release This will generate static pages for your domain: http://www.domain.xxx/awstats/

this way all links work
Reply With Quote
  #20  
Old 07-13-2004, 01:08 PM
rldev rldev is offline
Verified User
 
Join Date: May 2004
Posts: 1,074
awstats installed in each user's cgi-bin?

Why not set it up so that it runs in a server wide cgi-bin. This makes it very easy to update and should operate with much lower overhead.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Stats Control (Yet another AwStats Plugin ;) ClayRabbit 3rd Party Software 183 04-27-2010 01:12 PM
AWStats Plugin for DA [version 3.0+] sullise 3rd Party Software 343 08-01-2009 04:43 PM
Awstats plugin problem Daskew Installation / System Requirements 0 10-12-2007 07:22 AM
AWStats plugin help.. CodedChaos 3rd Party Software 0 06-24-2007 02:27 PM
Awstats without plugin, rotating logfiles LinQ General Technical Discussion & Troubleshooting 0 02-11-2006 04:56 AM


All times are GMT -7. The time now is 07:42 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
DirectAdmin © 2007 JBMC Software