AWStats Plugin for DA [version 3.0+]

Awstats - FreeBSD 6.x

Well, after many days of frustration and Awstats not working on my new server, clients getting frumpy because they can't see their Awstats, I figured I would try another solution.

I currently have an existing DA box that I'm transferring all websites off of onto my new box...the one that awstats doesn't work on.

I simply copied the awstats folder out of the /usr/local/directadmin/plugins/ folder using scp and placed a copy in the plugins/ folder on the new server.

I then made sure to match the permissions of the old server...everything owned by diradmin.

I then opened up DA as Admin, went to the Plugin Manager and there is Awstats sitting there. It said everything was installed (which I knew it wasn't) so I simply un-installed it (not deleted it), re-installed it and then activated it.

I then returned to the Admin area and there is is...bright and bold AwStats Statistics.

I clicked on the link, chose the users that can use Awstats, clicked save and bob's your mothers brother.

--

The version that I'm running is 2.1.6. If anyone needs a copy of it, PM me and I'll email it to you. It may not be the velvet glove approach, but it got things moving for me.

Cheers!!
 
Probably shouldn't turn off Webalizer..some users may not want to use AWStats (though I don't know why..lol).

Hi ..

Can you run both? .. if you don't stop the CRON entry they will both be fighting to read the same logfile yeh? ..

brett
 
permission error

Hey,

I got some error message after I issued the following command:

[root@server update]# cd /usr/local/directadmin/plugins/awstats/hooks
[root@server hooks]# ./alldomains.php
then I got:

Installed awstats.
(Re-)Activating CGI for dir
Doing an extra permission setting through shell..chmod: invalid option -- L
Try `chmod --help' for more information.

......

Warning: symlink(): File exists in /usr/local/directadmin/plugins/awstats/hooks/alldomains.php on line 58
(Re-)Setting permissions
chmod: invalid option -- L
Try `chmod --help' for more information.
Now (re-)creating your configuration file.

Warning: unlink(/home/steadcom/domains/steadcom.com/public_html/awstats/.htaccess): No such file or directory in /usr/local/directadmin/plugins/awstats/hooks/alldomains.php on line 47
Doing an extra permission setting through shell..chmod: invalid option -- L
Try `chmod --help' for more information.


etc.....

Its on Fedore Core 5

Regards,

Andrew
 
Last edited:
Just edit the alldomains.php script, search for chmod and remove the -L from where ever you find it. Not rocket science here, guys.

The -L is a option for BSD to follow symlinks. Original author must have written the plugin on BSD.
 
I have that problem to. I looks like it has something todo with the new apache/custombuild

i run:
custembuild
apache 2.2.*
php 5.2.5

awstats does not work

servers with:
customapache
apache 1.3.*
php 5.2.5

awstats works.

You need to remove --enable-safe-mode from configure.php4(5) file :)
 
Not sure if this is an error or it's NORMAL~ maybe u can advise me?

====================================================================

Checking if there is already something installed..
AwStats Directory already exists on domain
Checking if awstats files are available....
Checking for AwStats itself
Awstats already exists.
So I will delete it...Deleted!
Going to install the awstats.pl
+
(Re-)Activating CGI for dir
Ok .htaccess already exists let's delete it..Deleted!
Doing an extra permission setting through shell..+(Re-)Setting permissions
Doing an extra permission setting through shell..Done
Now (re-)creating your configuration file.
Warning: fopen(/etc/awstats/awstats.mrlua.com.conf): failed to open stream: Permission denied in /usr/local/directadmin/plugins/awstats/user/index.html on line 109 Warning: fwrite(): supplied argument is not a valid stream resource in /usr/local/directadmin/plugins/awstats/user/index.html on line 117 Warning: fclose(): supplied argument is not a valid stream resource in /usr/local/directadmin/plugins/awstats/user/index.html on line 118
Default password protection set.
Userid: mike
Password: default
It is EXTREMELY recommended that you use the Tune AwStats and modify the default values immediately!
Config file has been created and your statistics are now setup!
You can now view the statistics for your domain at: mrlua.com/awstats/
 
I've installed awstats and when i tried to enable it to a specific user i get the following error:

Warning: fopen(/usr/local/directadmin/plugins/awstats/hooks/permissions.txt): failed to open stream: Permission denied in /usr/local/directadmin/plugins/awstats/admin/index.html on line 32 Warning: fwrite(): supplied argument is not a valid stream resource in /usr/local/directadmin/plugins/awstats/admin/index.html on line 33 Warning: fclose(): supplied argument is not a valid stream resource in /usr/local/directadmin/plugins/awstats/admin/index.html on line 34 Select the users that can access the Awstats Plugin:

Any idea on how to fix it?

Thank you,
Rod
 
Oke, I install the plugin, it works oke.

Code:
Details

awstats successfully downloaded
plugin.tar.gz extracted
install.sh has been run:

Plugin Installed! 

Login to ssh and execute this script: /usr/local/directadmin/plugins/awstats/update/update.sh

Running the update script to replace current awstats binaries 
Done running script.. Please verify by checking the version numbers on the bottom of the generated pages!

So next I login into SSH and SU and execute the script:

Code:
admin:awstats# /usr/local/directadmin/plugins/awstats/update/update.sh
Checking for latest version<BR>
...
Updating to 6.7<BR>
Downloading 6.7<BR>
--21:16:50--  http://awstats.sourceforge.net/files/awstats-6.7.tar.gz
           => `/usr/local/directadmin/plugins/awstats/update/awstats.tgz'
Resolving awstats.sourceforge.net... 66.35.250.209
Connecting to awstats.sourceforge.net|66.35.250.209|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1,089,638 (1.0M) [application/x-tar]

100%[==========================================================>] 1,089,638    100.12K/s    ETA 00:00

21:17:02 (95.43 KB/s) - `/usr/local/directadmin/plugins/awstats/update/awstats.tgz' saved [1089638/1089638]

Extracting<BR>
/usr/local/directadmin/plugins/awstats/update/update.sh: /bin/tar: not found
Extracted.. now Updating<BR>
Awstats extracted in /usr/local/directadmin/plugins/awstats/update/awstats-6.7<BR>
cd: can't cd to /usr/local/directadmin/plugins/awstats/update/awstats-6.7
Copying awstas /usr/local/directadmin/plugins/awstats/update/awstats-6.7/wwwroot/cgi-bin/awstats.pl to basedir
cp: /usr/local/directadmin/plugins/awstats/update/awstats-6.7/wwwroot/cgi-bin/awstats.pl: No such file or directory

Warning: fopen(/usr/local/directadmin/plugins/awstats/hooks/cgi-bin/awstats.pl): failed to open stream: No such file or directory in /usr/local/directadmin/plugins/awstats/update/patch.php on line 3
<BR>ERROR can't open awstats.pl<BR>Patched..<BR>
cp: /usr/local/directadmin/plugins/awstats/update/awstats-6.7/wwwroot/cgi-bin/lib: No such file or directory
cp: /usr/local/directadmin/plugins/awstats/update/awstats-6.7/wwwroot/cgi-bin/lang: No such file or directory
cp: /usr/local/directadmin/plugins/awstats/update/awstats-6.7/wwwroot/icon: No such file or directory
cp: /usr/local/directadmin/plugins/awstats/update/awstats-6.7/wwwroot/cgi-bin/plugins: No such file or directory
Removing all temp. files<BR>
Updating all user files..<BR>

Done.. updated to 6.7<BR>
admin:awstats#

Oke that looks like trouble to me, but he, what the hack we are following the steps so maybe it's just not important.

Next thing is, enabling AWstats for the users... done.

Login as user and select domain to install AWstats on.

Code:
Checking if there is already something installed..
Creating AwStats dir on domain
Setting Directory PermissionsChecking if awstats files are availableError linking lib dir /home/bdejong/domains/mytestdomain.com/public_html/awstats/lib from /usr/local/directadmin/plugins/awstats/hooks/cgi-bin/libError linking icon dir /home/bdejong/domains/mytestdomain.com/public_html/awstats/icon from /usr/local/directadmin/plugins/awstats/hooks/cgi-bin/iconError linking lang dir /home/bdejong/domains/mytestdomain.com/public_html/awstats/lang from /usr/local/directadmin/plugins/awstats/hooks/cgi-bin/langError linking plugin dir /home/bdejong/domains/mytestdomain.com/public_html/awstats/plugins from /usr/local/directadmin/plugins/awstats/hooks/cgi-bin/plugins
Checking for AwStats itself
Going to install the awstats.pl
Warning: copy(/usr/local/directadmin/plugins/awstats/hooks/cgi-bin/awstats.pl): failed to open stream: No such file or directory in /usr/local/directadmin/plugins/awstats/user/index.html on line 76 Error linking awstats.pl /home/bdejong/domains/mytestdomain.com/public_html/awstats/awstats.pl from /usr/local/directadmin/plugins/awstats/hooks/cgi-bin/awstats.pl
(Re-)Activating CGI for dir
Doing an extra permission setting through shell..+(Re-)Setting permissions
Warning: chmod(): No such file or directory in /usr/local/directadmin/plugins/awstats/user/index.html on line 100 Warning: chown(): No such file or directory in /usr/local/directadmin/plugins/awstats/user/index.html on line 101 Doing an extra permission setting through shell..Done
Now (re-)creating your configuration file.


Default password protection set.
Userid: usert
Password: default

It is EXTREMELY recommended that you use the Tune AwStats and modify the default values immediately!

Config file has been created and your statistics are now setup!

You can now view the statistics for your domain at: mytestdomain.com/awstats/

When I go to mytestdomain.com/awstats/ and login, I get 403 errors

Any help? :confused::confused:

DA 1.32.2
Freebsd 6.0
 
Why don't you use AWstats that comes with DirectAdmin? Is there any reason to use the plugin? :) If not, just do:
Code:
cd /usr/local/directadmin/scripts
./awstats.sh
service directadmin restart
 
Sorry, but I don't understand your answer :) You don't need a 3rd party plug-in to have AWstats installed/updated.
 
Since John has decided to include Awstats into the current release of DA, I've removed the plugin from my server. If anyone wants to use AWStats now, just update to 1.322 and use the DA supplied one. It's the same script with some modifications from what I can tell. Hopefully John will give credit where credit is due to the original authors, etc. ;)
 
Hi .. i've been using this ..

If I now enable the DirectAdmin support for AWStats, will this erase any user data currently viewable? ..

Brett
 
BTW, be aware that the stats created by the plugin probably will not jive with the new DA version, even though John used the same concepts, he did use different directories, etc. If you need a way to convert the data, I suggest you ask him to provide a conversion script....I'm not supporting the plugin or any conversions or questions about how to convert it. From what I understand, smtalk did the incorporation...that's who you should ask. ;)

Also, anyone using the plugin, should NOT use the DA version without completely testing it first..especially since it's a GLOBAL switch for ALL users. Tread lightly lest you p*ss off your users. :)
 
Last edited:
Since John has decided to include Awstats into the current release of DA, I've removed the plugin from my server. If anyone wants to use AWStats now, just update to 1.322 and use the DA supplied one. It's the same script with some modifications from what I can tell. Hopefully John will give credit where credit is due to the original authors, etc. ;)

Which one is the same script /usr/local/directadmin/scripts/awstats.sh (made from roundcube.sh structue etc.) or /usr/local/directadmin/scripts/awstats_process.sh that is written from 0? :) P.S. thank you for the 3rd party plug-in.
 
Which one is the same script /usr/local/directadmin/scripts/awstats.sh (made from roundcube.sh structue etc.) or /usr/local/directadmin/scripts/awstats_process.sh that is written from 0? :) P.S. thank you for the 3rd party plug-in.

Meant to say, same process....

anyway..you need to be sure that the DA script does not interfere with plugin stats, or at least converts them to the right paths. Also..

awstats are places as static html pages into:
/home/user/domains/domain.com/awstats

Is where the plugin puts it's scripts and .htaccess, etc...so you could potentially break plugin setups...
 
Back
Top