PDA

View Full Version : Configuring Awstats for ispconfig


feanor
15th September 2005, 12:47
Hi, I've built a script and a template config file for awstats to work automatically with ispconfig/apache2. Just put it in a cron job and let it do the work. It works for me, though I don't use any authentication for the stats themselves.
Also, it needs a template file for awstats.
Last, you need to add a couple of lines in your apache2.conf file to create a logfile that can be used by awstats properly:

-----
LogFormat "%v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" virtual_combined

# Add this log file for use with Awstats
CustomLog "|/root/ispconfig/cronolog --symlink=/var/log/httpd/awstats_access_log /var/log/httpd/awstats_access_log_%Y_%m_%d" virtual_combined
-----

Use it at your own risk :-)

Konstantinos

falko
15th September 2005, 13:01
Thanks a lot! :) :) We'll test this.

Could you please upload it again as tar.gz? I've just changed the forum settings to allow the upload of tar.gz files. :)

feanor
15th September 2005, 13:08
Thanks a lot! :) :) We'll test this.

Could you please upload it again as tar.gz? I've just changed the forum settings to allow the upload of tar.gz files. :)

Done, Thanks :-)

misterm
23rd September 2005, 09:22
Hello with all

I am happy that there is a system for this Awstats scripts for ispconfig, but I would like to have myself how one it install, I see just that it is necessary to add lines in apache2.conf, of agreement, but, one does not need install Awstats, is to configure it in such manner, so that it functions with the Web sites.

The only thing which I miss, it is an easy way, to install it under debian or another distribution, I know one will say to me, will seek on the Web, one does not have all the people available on the site to do it.

Thank you in advance

MM ;)

Hellbound
25th September 2005, 22:48
anyone have tried this?
I've ended up installing ispconfig for almost 5 times due my lack of knowledge, I just like awstat very much and want to have it.

thanks

DevilAtWork
26th September 2005, 14:47
Hi Feanor,

I am a newbie and interested in your awstats scripts for Ispconfig but a little bit confuse on how to install it...how to use the local and template.. can you elaborate more on the steps?

Fyi, I installed awstats RPM.

DevilAtWork
27th September 2005, 19:10
Hi Feanor,

I am a newbie and interested in your awstats scripts for Ispconfig but a little bit confuse on how to install it...how to use the local and template.. can you elaborate more on the steps?

Fyi, I installed awstats RPM.
I have manage to install the awstats....but can I know how to put the link into the ISPconfig? I tried to use the update manager to add a url but it shows the following error:

Installations Anweisungen nicht gefunden: /home/admispconfig/ispconfig/temp/9e0ce6c98028e12d881c6618b75be317/package.ins

Somebody please help me! :(

till
27th September 2005, 19:38
The update manager is for installing .pkg upadte packages. as far as i know there is no AWStats package that can be installed with the update manager.

The error you got means that the package you uploaded is no valid .pkg package for ISPConfig.

Hellbound
27th September 2005, 19:44
so how can we have the link the ISPConfig's tools page? can we manually add that ?

till
27th September 2005, 20:01
You can change the file:

/home/admispconfig/ispconfig/web/tools/inhalt_tree.php

or you build a new .pkg installer for awstats. There must be a thread about building .pkg packages anywhere in the forums.

DevilAtWork
28th September 2005, 20:49
You can change the file:

/home/admispconfig/ispconfig/web/tools/inhalt_tree.php

or you build a new .pkg installer for awstats. There must be a thread about building .pkg packages anywhere in the forums.

Thanks a lot, Till. I have tried to look into inhalt_tree.php but had a hard time because mostly written in German. Anyway, I added an Awstats directory in /home/admispconfig/ispconfig/web/tools/tools and redirect a link to the domain's awstats page. It works if I hard code the domain url. My problem is I need to replace this link with a varieble domain url...i tried to use $web["web_domain"] and other variebles but fail. What I want is "http://www.domainname.com" instead of "https://www.domainname.com:81" to run the command "http://www.domainname.com/awstats/awstat.pl?config=www.domainname.com".

Would appreciate your help. Thanks.

till
28th September 2005, 21:28
This will not work like this, because one client can have more then one domain and the name of the domain is no not available in the tools section.

SleeperZ
24th March 2006, 04:22
I've made a slight change to the shell script which installs an .htaccess file and secures the script. using the .htpasswd set for the other stats.

If anyones interested send me a PM and i'll put it up.
====

As an aside, anyone got any idea why the stats would not be showing after successfully running?

I get: Never updated (See 'Build/Update' on awstats_setup.html page) The datadir is /var/lib/awstats...

Cheers.

Found the fault if anyone has a similar problem: The ownership of the datadir (/var/lib/awstats) needs to be owned by the webserver. I was running my webserver under a different username / group to the default.

fobicodam
20th May 2006, 23:15
i mean.. is it too dificult to do a step by step for newbies? i mean.. i dont want to be a linux programer, i just want to download something and make it works ! ive installed awstats.. now what?? i need to configure all the .conf again? can it be done automaticaly?

till
21st May 2006, 13:43
i mean.. is it too dificult to do a step by step for newbies?

No. But AWStats is not supported by ISPConfig. You cannot expect a software that is not supported to work automatically. ISPConfig uses webalizer as statistics package and this works without manual configuration.

funkyade
27th May 2006, 02:15
Hi, I've built a script and a template config file for awstats to work automatically with ispconfig/apache2. Just put it in a cron job and let it do the work. It works for me, though I don't use any authentication for the stats themselves.
Also, it needs a template file for awstats.
Last, you need to add a couple of lines in your apache2.conf file to create a logfile that can be used by awstats properly:

-----
LogFormat "%v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" virtual_combined

# Add this log file for use with Awstats
CustomLog "|/root/ispconfig/cronolog --symlink=/var/log/httpd/awstats_access_log /var/log/httpd/awstats_access_log_%Y_%m_%d" virtual_combined
-----

Use it at your own risk :-)

Konstantinos
This script looks great!

Just one question, how do I use it?

Do I need to edit the paths inside the script?

I get errors regarding 'localhost' when I run it from the command-line.

cheers...

falko
27th May 2006, 13:52
Just one question, how do I use it?Create a cron job for it. Run crontab -e as root.


I get errors regarding 'localhost' when I run it from the command-line.

What are the exact error messages?

punto
2nd August 2006, 03:37
Feanor,

Thankyou for this script and template, seems to be working a treat :)

Cheers

Matt

taylan
27th November 2006, 15:56
Hello
how can i check webalizer log through the web browser and. is there any
pkg for awstats thank you very much

till
27th November 2006, 16:59
AWSTATS:

http://www.howtoforge.com/forums/showthread.php?t=7293

The URL for webalizer is http://www.yourwebsite.com/stats The stats where created nightly, so you might have to wait up to 24 hours until the first statistics where generated.

taylan
29th November 2006, 12:34
Hello
i am using ispconfig more than 5 months it works really good i was checking stats on straight from /usage folder it seems webalizer working there but
when i put url adress www.yoururl.com/stats it gives me ispconfig page not found message
i am using Centos i really want to use stats .If i installed my server again because it works really fine .what i need to do i should back up of ispconfig db
or what it is the best way to have fully working server .Thank you very much

Regards

AWSTATS:

http://www.howtoforge.com/forums/showthread.php?t=7293

The URL for webalizer is http://www.yourwebsite.com/stats The stats where created nightly, so you might have to wait up to 24 hours until the first statistics where generated.

falko
30th November 2006, 15:26
If it is a new web site, you must wait 24 hours until your first stats are generated. They are generated by a cron job at 4.00h in the night.

If you have waited long enough: what's the output of crontab -l?

sebandres
21st May 2007, 15:23
Hi! i've installed the awstats beta1 package and when i go to /stats on any of my domains it asks for a user and password, i've tried the ones of my clients, my admin pass, and still nothing, what user/pass should i use??

falko
22nd May 2007, 17:25
You must use a username and password of one of the email/ftp users of that web site, not your ISPConfig login! ISPConfig users are not system users.

steve51184
22nd February 2009, 19:04
will this still work as it's now 3 and a half years old or is there a better way to get awstats to work with ispconfig?

falko
23rd February 2009, 18:38
You can try this: http://www.howtoforge.com/forums/showthread.php?t=7293
I haven't tried any of these methods, so I can't tell if/how good they work.

steve51184
23rd February 2009, 19:14
thank you worked perfect