Stats Control (Yet another AwStats Plugin ;)

For those of you running Awstats 6.4 installed with this plugin, what have you done to upgrade Awstats 6.4 to handle remote exploitable vulns? It also appears in 6.5.

If your running mod security, how have you gotten by the awstats rules placed inside of mod_security.conf? If you add awstats rules in there, your installation will fail when the user attempts to view his/her website stats.
 
Hello,

Firstly, thanks to ClayRabbit for this plugin!

I have installed this plugin a run /usr/local/directadmin/plugins/Stats_Control/scripts/stats_run.sh
manually from the command line. No error

The /var/log/stats_run.log seems to be correct:
2006-09-30 17:54:35 - Running awstats for domain.com
2006-09-30 17:54:36 - Running awstats for domain2.com
2006-09-30 17:55:08 - Running awstats for domain3.com

Also the file .../stats/awstats092006.domain.com.txt
exists.

But when I come to domain.com/cgi-bin/awstats/awstats.pl?config=domain.com, there is only "Never updated (See 'Build/Update' on awstats_setup.html page)! and data displayd. Everything else seems to be ok.

Does anybody have idea what is wrong?
Thanks for any suggestion.

-Martin
 
Try to examine .../stats/awstats.log content.
Thank you.
Code:
Update for config "/etc/awstats/awstats.xxx.com.conf"
With data in log file "/var/log/httpd/domains/.rotate/.rotate/xxx.com.log"...
Phase 1 : First bypass old records, searching new record...
Direct access after last parsed record (after line 137500)
Jumped lines in file: 137500
 Found 137500 already parsed records.
Parsed lines in file: 34228
 Found 0 dropped records,
 Found 0 corrupted records,
 Found 0 old records,
 Found 34228 new qualified records.

It seems to be correct, isn't it?
What else could be wrong - it seems to me that awstats.pl couldn't find stats files, but I have no idea where to change it.

Thanks in advance.
 
Last edited:
Install via ssh?

I just moved a bunch of domains to a server with this plugin and I'd like to install it for each of them from the command line. Is this possible?
 
Last edited:
/etc/awstats/awstats.domain.com.conf

/etc/awstats/awstats.domain.com.conf looks like this for each domain:
Code:
Include "/home/admin/.plugins/stats_control/aw_default.conf"

LogFile="/var/log/httpd/domains/__ROTATE_DIR__/domain.com.log"
DirData="/home/user/domains/domain.com/stats"

Include "/home/admin/.plugins/stats_control/aw_override.conf"
Should the include files reference files in the user's directory rather than admin's?

And if the user creates a custom awstats.conf file, it doesn't seem to be applied.
 
Re: /etc/awstats/awstats.domain.com.conf

twv said:
Should the include files reference files in the user's directory rather than admin's?
No.
And if the user creates a custom awstats.conf file, it doesn't seem to be applied.
Ñustom awstats.conf is not included directly but values from it transferred to /etc/awstats.<domain>.conf with awstats_root.sh script.
 
Thanks for the reply. An thanks for the plugin!

Why is there both a default and an override? What types of settings should go in the override?

When does awstats_root.sh run?

Also, any way to add awstats to domains from the command line?
 
twv said:
Why is there both a default and an override? What types of settings should go in the override?
Settings which should never be overriden by any user. So, they will be owerriden by settings specified in this file.
When does awstats_root.sh run?
It's called from stats_run.sh for every domain with awstats enabled.
Also, any way to add awstats to domains from the command line?
Currently there is no script or command for that. For example, you can enable awstats for one domain and copy files from /home/*/domains/*/.plugins/stats_control to corresponding folder of any other domain. (Files should be owned by corresponding user.)
Something like that I think.
 
Last edited:
I need to move users from one server to another. Will DA's backup/restore mechanism transfer stats control settings? I have customized awstats.conf for some users.

Also, will the prior months' awstats history transfer?
 
Last edited:
All user files located under domains/*/ folder, so I suppose all settings and old stats will be backuped and restored without problems.
 
Thanks ClayRabbit, great plugin. I had some problems installing as I don't use 'admin' as my DirectAdmin admin login.

Perhaps there's some way of replacing /home/admin/.plugins with /home/|ADMINUSER|/.plugins?

Thanks!
Matt :)
 
There may be more than one admin user. So where would ADMINUSER point?

Perhaps this workaround will help:

Code:
cd /home/
ln -s REALADMINUSER admin

Jeff
 
Hi ClayRabbit,

Do I need to apply the patch if I'm running CentOS 4.4 currently? If so, how can I apply the patch file? Thanks.

Anthony.
 
I've tried to read through this entire thread but may have missed a solution.

I keep on getting the 'never updated' message at the top of every awstat report.

I can run the stats_run.sh script and it still will not show the stats.

looking in /var/log/stats_run.log I get the following:

<date> <time> - Running webalizer for <domain>
<date> <time> - Running awstats for <domain>
<date> <time> - Running awstats for <domain>
<date> <time> - Running webalizer for <domain>

in /home/<user>/domains/<domain>/stats/awstats.log I get the following:

Update for config "/etc/awstats/awstats.<domain>.com.conf"
With data in log file "/var/log/httpd/domains//<domain>.com.log"...
Error: Couldn't open server log file "/var/log/httpd/domains//<domain>.com.log" : Permission denied

Setup ('/etc/awstats/awstats.<domain>.com.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).


Has there been a solution to the above problem?
 
Includes in users' awstats.conf?

I have various ExtraSections defined and saved in text files. I'd like to be able to include them in users' awstats.conf files like so:
Code:
Include "/home/admin/.plugins/stats_control/extras/google-searches.conf"
Possible? If so, what am I doing wrong -- when I run stats_run.sh the ExtraSections are not being added if I try to call them from the includes file. Permissions are set as so:
Code:
# ls -l /home/admin/.plugins/stats_control
<snip>
drwxr-xr-x  2 admin admin 4096 Dec 14 14:24 extras

# ls -l /home/admin/.plugins/stats_control/extras/
<snip>
-rw-r--r--  1 admin admin 610 Dec 14 13:47 google-searches.conf
 
For all of those wanting to use this...don't....

For those of you thinking about using this..DO NOT!

It doesn't update the stats and many people have problems.

I'm going back to something that works...fusionictnl script. Doesn't seem like many people can get this to work as this was made specifically for ClayRabbit. I've spent several hours now trying everything including chmod and ownership and it simply will not update the stats.

Everything has installed fine.

0/10 support
0/10 functionality
0/10 overall
 
Back
Top