Stats Control (Yet another AwStats Plugin ;)

I removed the plugin ages ago , becourse of no reply of the maker here for ??? time and that i cant affort to wait...

My users are depending on a working stats instead of no stats at all.

The uninstall worked fine ( so 1 thing is working on that plugin ) :rolleyes:

If someone gets this working without errors on many systems , they can contact me , but otherwise , dont bother , i want something that works...
 
How to upgrade

This worked for me, but I make no guarantees

Code:
cd /usr/local/directadmin/plugins/Stats_Control/
wget [url]http://superb-west.dl.sourceforge.net/sourceforge/awstats/awstats-6.7.tar.gz[/url]
tar -zxvf awstats-6.7.tar.gz
chown -R diradmin:wheel awstats-6.7
mv awstats awstats-6.4
ln -s awstats-6.7 awstats
mv awstats/wwwroot/* awstats
 
Last edited:
nice work there twv...

Worked for me too [CentOS 4.x].

Would recommend that you change:

chown -R admin: awstats-6.7

to:

chown -R diradmin:wheel awstats-6.7

to keep it inline with the DA plugin installer's credentials.

Seems to work fine like this, but the plugin itself works great for me :)

Had no luck with the other plugin here.

Has a few bugs here and there but does the job for me :)

Just wondering how secure having to use CGI is tho in a public directory? I dont generally have CGI enabled for people but because of this plugin, i'm going to have to I think.

Also, unless i missed it, in the admin options, what does the "Default statistics processor" option actually mean and what does it do?

I'd be up for helping ClayRabbit with help with the descriptions etc in the admin / user panels if it would help.

Regards all.
Nath.
 
chown -R diradmin:wheel awstats-6.7
You're right. I've updated my post.
Just wondering how secure having to use CGI is tho in a public directory? I dont generally have CGI enabled for people but because of this plugin, i'm going to have to I think.
Not sure. I password protect the public directory and use a non-standard location (ie not "awstats" or "stats") and so far no troubles.
 
Still Permissions Error...

All of sudden this stopped working for me.

I have followed the above and still no luck.
FREEBSD 6.1 DA 1.31.1
Permissions are as follows:
Here: /etc/awstats

2 -rw-r----- 1 root THEUSER 258 Nov 2 00:41 awstats.theirdomain.com.conf

And HEre: /var/log/httpd/domains/
2 -rw-r--r-- 1 root nobody 4 Nov 24 05:38 domain.com.bytes
152 -r--r----- 1 nobody THEUSER 154034 Nov 24 05:38 domain.com.error.log
736 -r--r----- 1 nobody THEUSER 737095 Nov 24 05:38 domain.com.log

Any ideas I get this when trying to run manually:
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).

And nothing when I run the cron.
 
All of sudden this stopped working for me.

I have followed the above and still no luck.
FREEBSD 6.1 DA 1.31.1
Permissions are as follows:
Here: /etc/awstats

2 -rw-r----- 1 root THEUSER 258 Nov 2 00:41 awstats.theirdomain.com.conf

And HEre: /var/log/httpd/domains/
2 -rw-r--r-- 1 root nobody 4 Nov 24 05:38 domain.com.bytes
152 -r--r----- 1 nobody THEUSER 154034 Nov 24 05:38 domain.com.error.log
736 -r--r----- 1 nobody THEUSER 737095 Nov 24 05:38 domain.com.log

Any ideas I get this when trying to run manually:
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).

And nothing when I run the cron.

I know the feeling.
I had this issue from November 3rd.
It just stopped.
We didn't do anything in the server,. nothing chagned. It just stopped!
Again, we tried everything,. played with permissions, tried to do lots of different things. Nothing helped. Running manually, running cron, you name it.
Nada.
Then, a week and a half later... it came back to life again with no apparent reason.
It started working as if there was no problem.
Can't figure that one.
Try to wait that week and a half, maybe it will work for you too.
 
Try to wait that week and a half, maybe it will work for you too.

It stopped working on Nov. 12. Still hasn't started working.

You did nothing to your server and then it started working again?
 
It stopped working on Nov. 12. Still hasn't started working.

You did nothing to your server and then it started working again?

As stupid as this may sound.. that's exactly what happen.

Actually, I started migrating the various accounts to the original plugin (that works quite well) and while we were doing the copying of old data of the non-working stats to /etc/awstats/ it started running again with no errors.
 
Sometimes (I beleive during update or so) DirectAdmin changes permission on /var/log/httpd/domains to 750 root:nobody
You need to change it back to 711 for plugin to work.
 
Last edited:
When i look in the webalizer.log file in /home/user/domains/domain.com/stats/webalizer.log i see this.

+ /usr/local/bin/webalizer_default -c /home/admin/.plugins/stats_control/wb_default.conf -c /etc/webalizer/domain.net.conf /
var/log/httpd/domains//domain.net.log
Error: Can't open log file /var/log/httpd/domains//domain.net.log
Webalizer V2.01-10 (FreeBSD 6.1-RELEASE) English
+ [ 1 -ne 0 ]
+ set +x

Is there a reason why it catn open the log file for webalizer?

I see this on every domain.
 
Last edited:
How to upgrade awstats to 6.6 from 6.4?

BUMP! Anyone?

Good question. How does Awstats gets updated to the latest version? I think my version is still 6.5 outdated a vulnarable to exploits.

Is there an update producure instead of reverting to manual updates?
 
Even so, i think the Stats control plugin should be released with new updates when necessary.

Yes, that'd be nice. It'd also be nice if DA just included awstats by default, with no plugins necessary.
 
Seems under your OS environment variables substitution inside awstats.conf not working correctly.
Try to apply plugins/Stats_Control/awstats/cgi-bin/awstats.pl.rh90.patch to awstats.pl

What do you mean? Do you mean add (cut and paste) the contents of the file awstats.pl.rh90.patch to the end of the file awstats.pl? Or do you mean just execute the file awstats.pl.rh90.patch?
 
(1) When installing the patch (if you are a linux user, specifically I use CentOS) make sure you set the file permissions for both the awstats.pl file and the awstats.patch file.
What do you mean, set the file permissions to what?

(2)Make sure also if you are getting errors on accessing the Log files (or no stats) That you change your permissions all the way up to var/log/httpd (this was set to only able to read/write or execute from owner(700) So I CHMOD that to 755.
Again, more information please. Set what, which files, which directories? Set them to what permission?

var/log/httpd/domains/mysite.com.log chmod to 777 (maybe this is ok at 755 but I haven't checked it)

Setting this to 777 is a security risk isn't it?

I spent my whole Sunday trying to get all 3 versions to work that are here on the site and it was really frustrating getting it to work. I am quite technical, and good at troubleshooting so I would suggest you take these suggestions seriously.

I also had to uninstall and reinstall a few times so if you have an older site, with stats you need to protect, I suggest you make backups!

If you are going to install this package and you are having problems you may need to remove any older files before trying to update the new ones, but I feel that if you follow the troubleshooting steps above first, you may find yourself doing alot better.

So with Putty program for SSH and this script I was able to successfully get the awstats to run ahd the script to update with-in the web-browser whenever I clicked update.

But after 9 hours of troubleshooting you'd expect to get somewhere hehe

I'm just giving up. To much work needed to get this plugin working for Centos5. The day I installed it, it produced stats, but hasn't worked since.

Might work ok on FreeBSD but doesn't work under Linux, due to the errors listed above by TesterJ.
 
Can this plugin work without having cgi-bin enabled? Can it be modified to work without it? We don't give out cgi-bin access on our servers, so this is a problem for us.
Any pointers on how to set it such that we don't need to enable cgi-bin?

The original fusionictnl's plugin didn't need to have cgi-bin enabled, so it was great to have it.

thanks,

-Alon.
 
Back
Top