AwStats plugin for DA [Still in BETA]

Demio said:
Could you please summarize your way in a nice and tidy guide? :D

Read 2-3 posts back.

Or wait till next week when I release version 3 with all the changes in it. Since this plugin is released under GPL, I'm going to take it and go forward with it and add some enhancements, including the things I've mentioned earlier and I have a lot of other improvements I want to build in, like more admin functions (custom logos, custom header/footers, more control of the other options in the config at both the admin and user level, etc.
 
sullise said:
Changes will be:

- AllowToUpdateStatsFromBrowser will default to 0 (off)
- Change path in update.sh to the current version download to enable 6.6 to be the default download (it's stable..been using is for months..since it got released with no problems)
- Add the code to force data to the users /stats directory
- Add the code to force password protection
- Add the code to block unauthenticated users from view other domains stats

If I get frisky, I may add some other code to give the user (and admin) more options upon install for the configuration...things like header and footers, logo, etc.

As with the old release, be free. [/B]

Wow this sounds very good! Could you include an option for subdomains as well maybe?
 
Subdomain issue is a problem with AWStats, not the plugin..that's been mentioned before. If you do create real subdomains (where you actually define abc.domain.tld as a physical account in the DA CP and not as a virtual subdomain (domain.tld/abc), you can just ativate AWStats in it as normal.
 
I wouldn't call it a problem with AWStats; I'd call it an artifact of how domains are created. A subdomain created in DirectAdmin (in most control panels) is simply a subdirectory. If you want it to be counted by your stats program set it up as a domain.

Jeff
 
yeah...what he said...lol.

Guess that's a little clearer then my phrasing, same jist though. ;)
 
hi

i installed but when i try to read my stats, some stats are readable but i get this error at the top of the page:

Warning: Can't find language files for "en". English will be used.
Warning: Can't read file "status_http.pm" (status http detection will not work correctly).
Check if file is in "./lib" directory and is readable.
Warning: Can't read file "search_engines.pm" (search engines detection will not work correctly).
Check if file is in "./lib" directory and is readable.
Warning: Can't read file "domains.pm" (domains detection will not work correctly).
Check if file is in "./lib" directory and is readable.
Warning: Can't read file "operating_systems.pm" (operating systems detection will not work correctly).
Check if file is in "./lib" directory and is readable.
Warning: Can't read file "robots.pm" (robots detection will not work correctly).
Check if file is in "./lib" directory and is readable.
Warning: Can't read file "browsers.pm" (browsers detection will not work correctly).
Check if file is in "./lib" directory and is readable.
Warning: Can't read file "mime.pm" (mime detection will not work correctly).
Check if file is in "./lib" directory and is readable.

any ideas?
 
Looks like it didn't get installed properly to me. Never had a problem installling it...have it on onver 80 servers.
 
sullise said:
Looks like it didn't get installed properly to me. Never had a problem installling it...have it on onver 80 servers.

thanks for your reply. it was a permision problem of those files, i have chmod them manually and all works fine now.

thanks
 
Ok...version 3.0 of this plugin seems to be working ok, so I'm releasing it here..



Download Version 3.0.0 Plugin

Changes from 2.1.9:

- Update.sh script grabs the latest AWStats build (currently 6.6) now instead of 6.5.

Previoiusly you had to edit the update script and make a change to the url, but I've permentantly fixed that

- Changed default location of users stats data.

It is now stored in /home/user/domains/domain.tld/stats folder. The config file will stay where it always has been in /etc/awstats. This means now that stats will count against your clients disk usage and on the plus side, be backed up by DA's normal processes. When moving a user to a new server, his stat data will follow him now. Only need to activate AWStats for that user on new server and do a normal AWStats install from the plugin in their User DA screen.

- Sets AllowToUpdateStatsFromBrowser=0 by default.

This prevents users from updating stats via web browser...more secure as this is one of the vuln that plagued AWS for a while in previous version.

- Set options that prevent users from displaying each others stats.

With previous versions you could use the "?config=domain.tld" parm to view other users stats, regardless if they had the directory password protected or not. Now the options are set to prevent his as long as the users /awstats directory is password protected. Thus the following was implimented.

- Automatically password protects users /awstats folder upon install.

Now when users do the install from the plugin, it will automatically password protect the folder and then prompt them to go change it in the tune stats option. It uses the same password for all new installs, but users are told to go change it. (I will probably modify this to create a random one in next version).

Upcoming changes:

- More options controls for both admin and user from within the plugin.
- Automatically update the directadmin_cron file to start collecting stats
- Automatically create the /usr/local/directadmin/scripts/custom/user_create_post.sh (if it does not exist)

Thus making it a one step install.

Let me know if their are any problems. And a big thanks to fusionicntl for his original work. I'm going to try and keep improving on his work and naturally, never a charge.
 
Last edited:
If I have the previous version installed how would I install this one instead?

Thanks in advance,
Carlos Lage
 
Demio said:
If I have the previous version installed how would I install this one instead?

Thanks in advance,
Carlos Lage

yes i have 2.19 and want to upgrade.. how do i upgrade?
 
I just deleted the old plugin and reinstalled the new one.

Note that existing user stats will be uneffected as long as they don't reinstall it from the user panel in DA.

You could then just copy their stats files to the individual /stats folder manual, delete their config files, and then reinstall from their user panels...but if you have a lot of clients, that's a lot of manual effort.

I'm working on a conversion script to convert existing installs (as we have 80+ of them between my servers and my partners).

I'd suggest you wait till then and just use this for new installs.
 
Well, I dont have any problems in deleting the old script completely. My hosting services aren't "live" yet and I only used it for my own websites.

Just tell me how to COMPLETELY remove the old plugin? Do I just uninstall and remove it or do I need to remove some directories manually?

-Carlos Lage
 
Just use the delete function from the Plugins Manager..that should do the trick. Won't touch any of the /etc/awstats files, only removes the /plugins/awstats entry in DA. Then just reinstall using the new version.

Shouldn't have to touch the custom create script, etc or the crontab entries.

You will need to run the update.sh to grab the latest version..

Oh yeah that's what I forgot...Version 3.0.0 also gets the latest awstats (6.6) now without having to modify the update.sh script.
 
Found a slight problem:

Warning: Variable passed to each() is not an array or object in /usr/local/directadmin/plugins/awstats/admin/index.html on line 33

When I tried to Save with no domains selected on the admin panel.
 
Hmm man, I dont think the stats are being kept in the /home/user/domains/domain.tld/stats directory.

When I move there the awstats files from /etc/awstats/ I get this error when acessing the stats:

Error: Couldn't open config file "awstats.cservers.eu.conf" nor "awstats.conf" after searching in path ".,/etc/awstats,/usr/local/etc/awstats,/etc,/etc/opt/awstats": No such file or directory
 
Demio said:
Found a slight problem:

Warning: Variable passed to each() is not an array or object in /usr/local/directadmin/plugins/awstats/admin/index.html on line 33

When I tried to Save with no domains selected on the admin panel.

That's OK...2.1.9 did that too...didn't notice it myself till recently..have to put a check in the script to bypass that process if there are no domains checked. doesn't hurt anything.
 
Back
Top