Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > Tips/Tricks/Mods

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 8th November 2006, 10:21
djtremors djtremors is offline
Senior Member
 
Join Date: Apr 2006
Location: Sydney
Posts: 278
Thanks: 0
Thanked 12 Times in 10 Posts
Default Awstats mod - uses dynamic pages (non static)

This is my version of the awstats page. It uses dynamic generating awstats.pl code and uses HTTP basic authentication to access the pages.

http://www.djtremors.com/index.php?o...=25&Itemid=139

The stats page is viewed under the domain you are checking and with a /stats on the end.
ie. www.domain.com/stats

Hopefully I got the installer.sh working enough to work on any Linux distro but it's been biased towards Fedora/Redhat/Centos.

Hopefully I've ironed out the installer and so on. I'm still currently working on it a bit. But it's pretty much all there.

NOTE: It's not compatible with the other awstats version released by one of the other contributors which creates static HTML pages. So make sure you pick one or the other.
Reply With Quote
Sponsored Links
  #2  
Old 8th November 2006, 11:02
domino domino is offline
Senior Member
 
Join Date: Aug 2005
Posts: 364
Thanks: 0
Thanked 9 Times in 8 Posts
Default

Thanks for this. If all works well, I think this would be a great ISPConfig Add-on
__________________
Shuttle XPC | Intel 865g | P4 3.2Ghz | ATI 9800 Pro
Hosts: Ubuntu 6.10 ~ XGL-Beryl SVN-Gnome | OS X 10.4.8 | WindowsXP
Virtual Appliances: Ubuntu Server 6.10 | WindowsXP | CentOS 4.4
Reply With Quote
  #3  
Old 8th November 2006, 11:46
djtremors djtremors is offline
Senior Member
 
Join Date: Apr 2006
Location: Sydney
Posts: 278
Thanks: 0
Thanked 12 Times in 10 Posts
Default

yeah I uploaded it to my friends Fedora box to test first time deployment which was were I realised some small missed files, mistakes and required changes to my scripts and then modified my local copies and so on.

So I hope I haven't missed anything or left something out. my mates machine is now working so should be fine.

Basically the way it works on the front side is like this:

1. Browse points to http://www.____.com/stats
2. The .htaccess file (created by the crontab/awstats.php file) authenticates the user and redirects to the /ispc.awstats/awstats.pl?config=www____.com page.
3. the crontab/awstats.php file creates all the .htaccess/.htpasswd files as well as creates all /etc/awstats/awstats.{domain}.conf files

All awstats data is stored in /home/admispconfig/ispconfig/web/ispc.awstats.data/, outside of the /ispc.awstats page.

Authentication files are stored together in /home/admispconfig/ispconfig/web/ispc.awstats/.htpasswd as well as the websites home directory. ONLY the domains allowed users can access their own sites so there's no cross site security issues there.

So hopefully everything is right to go first go for you all. Otherwise just msg me the hiccups and the configuration you got (ie. where's apaches confs are and crontab if not /var/spool/cron/root etc.etc.etc.)

thx
Reply With Quote
  #4  
Old 12th November 2006, 01:51
djtremors djtremors is offline
Senior Member
 
Join Date: Apr 2006
Location: Sydney
Posts: 278
Thanks: 0
Thanked 12 Times in 10 Posts
Default

Updated

Fixed a small bug which didn't create/update the awstats archive & db logs due to an incorrect DataDir setting in the /etc/awstats/awstats.model.conf file.
Full path corrects the problem.

Anyone with this bug can easily change the line in /etc/awstats/awstats.model.conf

and put instead
PHP Code:
DirData="/home/admispconfig/ispconfig/web/ispc.awstats.data" 
Reply With Quote
  #5  
Old 13th November 2006, 15:19
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,735 Times in 2,571 Posts
Default

Quote:
Originally Posted by djtremors
Fixed a small bug which didn't create/update the awstats archive & db logs due to an incorrect DataDir setting in the /etc/awstats/awstats.model.conf file.
Full path corrects the problem.
Did you change this in your package on http://www.djtremors.com/index.php?o...=25&Itemid=139 ?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #6  
Old 13th November 2006, 20:42
djtremors djtremors is offline
Senior Member
 
Join Date: Apr 2006
Location: Sydney
Posts: 278
Thanks: 0
Thanked 12 Times in 10 Posts
Default

yes, I ran an update script which auto creates the tgz and puts it on the site but forgot to at least create a changelog or even version file but yeah, if you see me mention an update then it's live on the download already.
Reply With Quote
  #7  
Old 28th January 2007, 14:10
Petr WhiskI Petr WhiskI is offline
Junior Member
 
Join Date: Aug 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Cross site security issues

Quote:
Originally Posted by djtremors
Authentication files are stored together in /home/admispconfig/ispconfig/web/ispc.awstats/.htpasswd as well as the websites home directory. ONLY the domains allowed users can access their own sites so there's no cross site security issues there.
Try this:
Log in stats of your site and change url in browser:
http://www.yoursite.tld/ispcstats/awstats.pl?config=www.another_site_on_the_same_isp.tld

So what do you thing about crossite security now?
Reply With Quote
  #8  
Old 28th January 2007, 14:25
martinfst martinfst is offline
Senior Member
 
Join Date: Dec 2006
Location: Hilversum, The Netherlands
Posts: 880
Thanks: 1
Thanked 18 Times in 17 Posts
Send a message via MSN to martinfst Send a message via Skype™ to martinfst
Default

Quote:
Try this:
Log in stats of your site and change url in browser:
http://www.yoursite.tld/ispcstats/aw...e_same_isp.tld

So what do you thing about crossite security now?
Did this (before you even posted) and the result in your browser is:
Code:
Error: User 'web1_xxxxxxxx' is not allowed to access statistics of this domain/config.

Setup ('/etc/awstats/awstats.www.anothersideatisp.tld.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).
So, now it's awstats rejecting, but even so, you don't have access.
Reply With Quote
  #9  
Old 28th January 2007, 14:59
Petr WhiskI Petr WhiskI is offline
Junior Member
 
Join Date: Aug 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default AllowAccessFromWebToAuthenticatedUsersOnly=0

Thanks, I found it.
In /etc/awstats/awstats.model.conf
have to set
AllowAccessFromWebToAuthenticatedUsersOnly=1

- it was AllowAccessFromWebToAuthenticatedUsersOnly=0 !! after fresh install of your package
Strange thing - look at /home/admispconfig/ispconfig/web/ispc.awstats/awstats.model.conf
there is AllowAccessFromWebToAuthenticatedUsersOnly=0 too...

Thank you for fast reply and hope
Reply With Quote
  #10  
Old 28th August 2009, 23:46
martinfst martinfst is offline
Senior Member
 
Join Date: Dec 2006
Location: Hilversum, The Netherlands
Posts: 880
Thanks: 1
Thanked 18 Times in 17 Posts
Send a message via MSN to martinfst Send a message via Skype™ to martinfst
Default Package update AWstats 6.9

I finally found the time to create an update for the AWstats package created by djtremors. The updates included in this package:
  • Updated to AWstats 6.9
  • Added the /js/ alias to the generic part of the Apache config, so you can include /js/awstats_misc_tracker.js in any page on any website if you like to create detailed stats like screensize: http://awstats.sourceforge.net/docs/...tml#SCREENSIZE
  • Updated the awstats creation script to adhere to the latest ISPConfig 2.2.32 setup, like to use the super account to view any site statistics
  • Removed the annoying two times authentication when trying to open the stats with https.
  • Improved install.sh script:
  • In the setup script, adapted the crontab to not interfere with webalyser entry.
  • The root crontab is during setup inserted at the correct location (based on Ubuntu 8.04 LTS)
  • The setup script can now be run multiple times without creating a messy apache.conf file
  • Fix permissions, to ensure the script runs nightly
The version is only tested on Ubuntu 8.04, ISPConfig 2.2.32. You can find the new package at http://www.tiempo.nl/ispconfig_awstats

Martin

Last edited by martinfst; 9th September 2009 at 09:09. Reason: annoying typo
Reply With Quote
The Following 2 Users Say Thank You to martinfst For This Useful Post:
falko (29th August 2009), SupuS (8th October 2009)
Reply

Bookmarks

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Howto suggestion suse PhP ver 4 + Ver 5 wwparrish Suggest HOWTO 11 7th August 2006 13:29
Suse Ispconfig and AWstats shajazzi Installation/Configuration 4 15th May 2006 23:04


All times are GMT +2. The time now is 20:11.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.