PDA

View Full Version : webalizer 403 Forbidden


angelbulas
26th May 2009, 01:30
Hi, i don't know if someone can help me, I have ISPConfig version 3.0.1.1, and when I try to access to http://mydomain.tld/stats I put my username (admin) and my password (I configured it in Sites>Domain>Statistics) but then my web browser send me the following message:

Forbidden

You don't have permission to access /stats/ on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

And in the logs at /var/log/ispconfig/httpd/mydomain.tld/error.log I notice the following two lines:

[Mon May 25 18:17:56 2009] [error] [client 1.2.3.4] Directory index forbidden by Options directive: /var/www/mydomain.tld/web/stats/
[Mon May 25 18:17:56 2009] [error] [client 1.2.3.4] File does not exist: /var/www/error/403.html

Did someone know what is the problem, I try to access /var/www/mydomain.tld/web/stats and the directory is empty, only the file .htaccess is present and have the following lines:

AuthType Basic
AuthName "Members Only"
AuthUserFile /var/www/clients/client5/web12/.htpasswd_stats
<limit GET PUT POST>
require valid-user
</limit>

I appreciate your help, thanks in advance

till
26th May 2009, 14:28
The statistics are created nightly, you have to wait up to 24 hours until you can access them.

angelbulas
26th May 2009, 18:02
Thanks for the quick reply, I forgot to tell you that I create my site 5 days ago and I still don't see statistics about it. Does the folder /var/www/mydomain.tld/web/stats should have any file? because I only have the .htaccess in that folder, thanks in advance

till
27th May 2009, 12:10
Please make sure that you have the webalizer package of your linux distribution installed.

angelbulas
27th May 2009, 17:27
yes, i have this version installed:
webalizer - 2.01_10-30.1.i386

What other thing it might be? I have CentOS 5.2 installed, thanks for your help

falko
28th May 2009, 12:49
What are the outputs of getenforce and which webalizer?

angelbulas
28th May 2009, 17:39
# getenforce
Disabled
# which webalizer
/usr/bin/webalizer

till
28th May 2009, 17:42
Please post the output of:

ls -la /etc | grep webalizer

angelbulas
28th May 2009, 17:55
# ls -la /etc | grep webalizer
-rw-r--r-- 1 root root 23735 Jan 8 2007 webalizer.conf

This are the uncommented lines in the file webalizer.conf :

LogFile /var/log/httpd/access_log
OutputDir /var/www/usage
HistoryName /var/lib/webalizer/webalizer.hist
Incremental yes
IncrementalName /var/lib/webalizer/webalizer.current
PageType htm*
PageType cgi
PageType php
PageType shtml
DNSCache /var/lib/webalizer/dns_cache.db
DNSChildren 10
Quiet yes
FoldSeqErr yes
HideURL *.gif
HideURL *.GIF
HideURL *.jpg
HideURL *.JPG
HideURL *.png
HideURL *.PNG
HideURL *.ra
SearchEngine yahoo.com p=
SearchEngine altavista.com q=
SearchEngine google.com q=
SearchEngine eureka.com q=
SearchEngine lycos.com query=
SearchEngine hotbot.com MT=
SearchEngine msn.com MT=
SearchEngine infoseek.com qt=
SearchEngine webcrawler searchText=
SearchEngine excite search=
SearchEngine netscape.com search=
SearchEngine mamma.com query=
SearchEngine alltheweb.com query=
SearchEngine northernlight.com qr=

till
28th May 2009, 18:09
Please run:

mkdir /etc/webalizer
ln -s /etc/webalizer.conf /etc/webalizer/webalizer.conf

and wait until tomorrow to see if the stats get created.

angelbulas
28th May 2009, 18:13
Thanks, i'm gonna do that and tomorrow I will check it out an I will let you know, thank you so much for your help.

angelbulas
3rd June 2009, 23:46
I check my webpage but I still can't see any stats yet :( , do you have another idea? thanks

robertlouwen
4th June 2009, 02:02
@ Angelbulas

I am also strugling with stats and looked around in several directories and found this:
In /etc/httpd/conf.d I found "webalizer.conf" then I vi-edit webalizer.conf and saw on the first line : Alias /usage /var/www/usage.

On my windows machine I go to www.something.org/usage/ and no login popup just a page with statistics about traffic and so on.

Don't ask me how ...

till
4th June 2009, 09:05
@ Angelbulas

I am also strugling with stats and looked around in several directories and found this:
In /etc/httpd/conf.d I found "webalizer.conf" then I vi-edit webalizer.conf and saw on the first line : Alias /usage /var/www/usage.

On my windows machine I go to www.something.org/usage/ and no login popup just a page with statistics about traffic and so on.

Don't ask me how ...

This file is not in use on a ISPConfig setup and you will not get any website stats with it!

The URL to get stats on a ispconfig server is www.yourdomain.tld/stats/

robertlouwen
4th June 2009, 12:21
@ Till,

I don't want to be rude but out of curiosity why is in the file /etc/httpd/conf.d/webalizer.conf Alias /usage /var/www/usage ?

I am only a dummy to ispconfig but I like it every day a little more and want to learn as much as possible.

Please see attached images for something.nu/usage.

till
5th June 2009, 12:25
I don't want to be rude but out of curiosity why is in the file /etc/httpd/conf.d/webalizer.conf Alias /usage /var/www/usage ?

This file is not from ISPConfig.

robertlouwen
5th June 2009, 14:58
@ Till, I looked at the tut. "perfect server.." and "webalizer" get's installed according to page 5 point 19.

The-Ghost
15th June 2009, 23:26
I can allso not acces the stats.
When I go to www.domain.tld/stats it's asking for a username and password.
When I fill in the client name and the stats password, it comes again with the request for login.

Is there soething I do wrong???

Regards Carlo

angelbulas
16th June 2009, 02:56
you have to go to your control panel, click on "Sites" and then click in the site that you want to enable statistics, then click on "Stats" and set a password. The user is always "admin" and the password is the one that you set, then you can login. I still can't see my statistics, i hope you do. regards

baskin
16th June 2009, 21:11
I have a similar problem.

I cannot access the stats page (403 error) after installing "Drupal" on the site and enabled drupal's .htaccess file on the root directory of the site.

Before installing drupal, i was able to access the stats page normally.

I'm not sure if this happened after the installation of drupal, but i suspect the new .htaccess file.

What should i check?

The-Ghost
16th June 2009, 21:14
you have to go to your control panel, click on "Sites" and then click in the site that you want to enable statistics, then click on "Stats" and set a password. The user is always "admin" and the password is the one that you set, then you can login. I still can't see my statistics, i hope you do. regards

Thanx, I used a wrong username. ;)

rukus77
18th June 2009, 05:18
Hi Till,

I am also having the same issue. I believe it began when I created a new site (web20) under client2. I looked at stats directory and noticed it was empty after getting a 403 forbidden message when accessing it from new site. I noticed that the stats directory on web20 was owned by root root, so I changed it back to web20 client2 and waited a few days, but nothing has appeared yet.

I then checked my other sites and it seems they stopped logging the same day I created that new site (web20). Directory is still empty and stats are no longer being created on my other sites.

Any ideas or suggestions?

Thanks,
Mike

till
18th June 2009, 10:57
Please post the output of:

which webalizer

baskin
18th June 2009, 15:17
Any suggestions for the problem that appeared after drupal's installation?

rukus77
18th June 2009, 19:23
Please post the output of:

which webalizer

It's;

# which webalizer
/usr/bin/webalizer

Thanks,
Mike

rukus77
20th June 2009, 23:18
It seems like web20 now has stats, but they are now combined with all other sites. The data present is not only from web20.

KillerSneak
22nd June 2009, 15:52
It seems like web20 now has stats, but they are now combined with all other sites. The data present is not only from web20.
I have the same problem. Another thing i notise is that according to teh moderators/staff here webalizer get's installed at:
/etc/webalizer/webalizer.conf
while after following the SuSe 11.1 + ISPconfig 3 it gets installed at:
/etc/webalizer.conf

Is this the problem why i get all websites @ 1 webalizer page? I have managed to almost complete my SuSe 11.1 + ISPConfig3 x64 documentation but i still have some small issues like this one unsolved + the whole DNS+NAME SERVERS aspect (can't send mail but can receiver) as well as the squirrel mail link from the client panel not working

till
22nd June 2009, 16:02
The stats can not be mixed up, most liekly you looked into the wrong location. The stats for the website are only in the stats directory of the site, stats in e.g. /var/www/webalizer or other directories are not from ispconfig and may contain the statistics for the whole sever without being splitted into separate sites.

KillerSneak
22nd June 2009, 16:24
The stats can not be mixed up, most liekly you looked into the wrong location. The stats for the website are only in the stats directory of the site, stats in e.g. /var/www/webalizer or other directories are not from ispconfig and may contain the statistics for the whole sever without being splitted into separate sites.

Sorry but I'm not looking into the wrong directory.

stats should be at www.domain.ltd/stats not? ->
user: admin
pass: set in isp config cliesn't panel

And then going to www.domain.ltd/stats shows the stats for all the website's on the box.

till
22nd June 2009, 16:31
Check your apache configuration if it comnatisn any global aliases for /stats

KillerSneak
22nd June 2009, 16:49
nothing with stats can be found in

/etc/apache2/httpd.conf .. Any other ideas.

I have the feeling ISPConfig3 uses

/etc/webalizer/webalizer.conf yes?

While after the tutorial it's located in

/etc/webalizer.conf for me, should i make a sym link ?

till
22nd June 2009, 16:54
Yes, please make a symlink. But this is just cosmetical as webalizer uses its defaults then and the log file is specified on the command line when webalizer gets invoked. Take a look at the con daily script in /usr/local/ispconfig/server/ for details of the webalizer part and also check the log files of the websites if they contain only lines for a specific website.

KillerSneak
22nd June 2009, 17:04
Okey i made the symlink, have to wait till tomorrow to see if it now takes the appropiate stats.

rukus77
23rd June 2009, 01:19
Hi Till,

I can confirm that I am reaching the stats from the actual domain (i.e. mysite.com/stats).

I checked apache config and only global aliases are for error, icons and script alias for cgi-bin.

I am certain the stats are combined because web20 is a brand new site and it contains data from last month. In Top 30 URLs, there are several files that belong to my other sites as well.

Any suggestions appreciated.

Thanks,
Mike

till
23rd June 2009, 10:48
Take a look at the access log of this site. Does it contain data from other sites?

KillerSneak
23rd June 2009, 11:49
Hi Till,

I can confirm that I am reaching the stats from the actual domain (i.e. mysite.com/stats).

I checked apache config and only global aliases are for error, icons and script alias for cgi-bin.

I am certain the stats are combined because web20 is a brand new site and it contains data from last month. In Top 30 URLs, there are several files that belong to my other sites as well.

Any suggestions appreciated.

Thanks,
Mike Indeed i can 100% verify this as:

85.223.51.109 -> server IP with domain www.donotarguehostedservers.com

On my main htdocs i serve files for my counter strike servers. So i can see that the domains get stats from them as well because of the maps and sounds people are downloading.

Take a look at the access log of this site. Does it contain data from other sites? What should i be looking at?

EDIT:
Another problem setting the password in the client panel for the stats page doesn't work. Only the password for the main account works (admin account)

rukus77
24th June 2009, 07:13
Hi Till,

The access.log file for the web20 site only contains data from this site. The access logs appear to be working properly...

Thanks,
Mike

Alex1
24th June 2009, 09:20
Same problem, webalizer seems don't starts

server104:/etc# which webalizer
/usr/bin/webalizer
server104:/etc# ls -la /etc/ | grep webalizer
drwxr-xr-x 2 root root 4096 23 giu 13:37 webalizer

Debian Lenny (perfect server)
cronjobs work, webalizer is in cron.daily and into root crontab i have:
* * * * * /usr/local/ispconfig/server/server.sh > /dev/null 2>> /var/log/ispconfig/cron.log
30 00 * * * /usr/local/ispconfig/server/cron_daily.sh > /dev/null 2>> /var/log/ispconfig/cron.log

KillerSneak
24th June 2009, 11:22
Still have the same problem :(

setting password for the client doesn't work (have to use the pass of main admin account)

and i still see stats for only 2 days:

vi /etc/webalizer.conf
gedit /etc/webalizer.conf


#Incremental no
to:
Incremental yes

#GeoDB no
to:
GeoDB yes

#GeoIP no
to:
GeoIP yes

#LinkReferrer no
to:
LinkReferrer yes

#CountryFlags no
to:
CountryFlags yes

#HideSite *webalizer.org
#HideSite localhost
to:
#HideSite *webalizer.org
#HideSite localhost

mkdir /etc/webalizer
ln -s /etc/webalizer.conf /etc/webalizer/webalizer.conf is what i have done for webalizer.conf

What am I missing here, i know i followed the 11.1 + ISPC3 to the point.

rukus77
24th June 2009, 17:02
Hi Till,

It appears that webalizer is compiling data from the global access log instead of the individual logs for each site.

Any suggestions or guidance on how to correct this?

Thanks,
Mike

SamTzu
25th June 2009, 11:37
Confirmed.
I have upgraded both Lenny and ISPConfig.
Same problem.

till
25th June 2009, 11:39
Do you downloaded a released update or did you update from SVN?

SamTzu
25th June 2009, 14:28
So far I have not installed from SVN.
I plan to test it some day but I'm bit too busy to try now.

till
25th June 2009, 14:33
Ok, I only asked as the statistics for the released version are working fine on my servers. Maybe the reason is the debian update and not the ispconfig update that you installed?

SamTzu
29th June 2009, 14:13
Data from: 2009-06-22 07:00 Reading package lists...
Building dependency tree...
Reading state information...
The following NEW packages will be installed:
libdns45 libisc45
The following packages will be upgraded:
apache2 apache2-doc apache2-mpm-prefork apache2-suexec apache2-utils
apache2.2-common bind9-host dnsutils libbind9-40 libisccc40 libisccfg40
liblwres40
12 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Inst libisc45 (1:9.5.1.dfsg.P1-2 Debian:5.0.1/stable)
Inst libdns45 (1:9.5.1.dfsg.P1-2 Debian:5.0.1/stable)
Inst bind9-host [1:9.5.0.dfsg.P2-5.1] (1:9.5.1.dfsg.P1-2 Debian:5.0.1/stable) []
Inst dnsutils [1:9.5.0.dfsg.P2-5.1] (1:9.5.1.dfsg.P1-2 Debian:5.0.1/stable) []
Inst libbind9-40 [1:9.5.0.dfsg.P2-5.1] (1:9.5.1.dfsg.P1-2 Debian:5.0.1/stable) []
Inst libisccfg40 [1:9.5.0.dfsg.P2-5.1] (1:9.5.1.dfsg.P1-2 Debian:5.0.1/stable) []
Inst libisccc40 [1:9.5.0.dfsg.P2-5.1] (1:9.5.1.dfsg.P1-2 Debian:5.0.1/stable) []
Inst liblwres40 [1:9.5.0.dfsg.P2-5.1] (1:9.5.1.dfsg.P1-2 Debian:5.0.1/stable)
Inst apache2-utils [2.2.9-10+lenny2] (2.2.9-10+lenny3 Debian-Security:5.0/stable)
Inst apache2-mpm-prefork [2.2.9-10+lenny2] (2.2.9-10+lenny3 Debian-Security:5.0/stable) []
Inst apache2.2-common [2.2.9-10+lenny2] (2.2.9-10+lenny3 Debian-Security:5.0/stable)
Inst apache2 [2.2.9-10+lenny2] (2.2.9-10+lenny3 Debian-Security:5.0/stable)
Inst apache2-doc [2.2.9-10+lenny2] (2.2.9-10+lenny3 Debian-Security:5.0/stable)
Inst apache2-suexec [2.2.9-10+lenny2] (2.2.9-10+lenny3 Debian-Security:5.0/stable)
Conf libisc45 (1:9.5.1.dfsg.P1-2 Debian:5.0.1/stable)
Conf libdns45 (1:9.5.1.dfsg.P1-2 Debian:5.0.1/stable)
Conf libisccc40 (1:9.5.1.dfsg.P1-2 Debian:5.0.1/stable)
Conf libisccfg40 (1:9.5.1.dfsg.P1-2 Debian:5.0.1/stable)
Conf libbind9-40 (1:9.5.1.dfsg.P1-2 Debian:5.0.1/stable)
Conf liblwres40 (1:9.5.1.dfsg.P1-2 Debian:5.0.1/stable)
Conf bind9-host (1:9.5.1.dfsg.P1-2 Debian:5.0.1/stable)
Conf dnsutils (1:9.5.1.dfsg.P1-2 Debian:5.0.1/stable)
Conf apache2-utils (2.2.9-10+lenny3 Debian-Security:5.0/stable)
Conf apache2.2-common (2.2.9-10+lenny3 Debian-Security:5.0/stable)
Conf apache2-mpm-prefork (2.2.9-10+lenny3 Debian-Security:5.0/stable)
Conf apache2 (2.2.9-10+lenny3 Debian-Security:5.0/stable)
Conf apache2-doc (2.2.9-10+lenny3 Debian-Security:5.0/stable)
Conf apache2-suexec (2.2.9-10+lenny3 Debian-Security:5.0/stable)

PS. I really love ISPConfig3 :) This is a great worklog system also since you can see what has happened.

SamTzu
29th June 2009, 14:24
Also noticed that the .htpasswd_stats file is missing.

rukus77
30th June 2009, 01:14
I'm using Centos5.3 and had followed your perfect setup guide.

I am collecting stats, but still combined with my other sites. I have performed several installs on other servers and everything appears fine, but the other servers only have one site at the moment, so stats may be combined as well, but do not have multiple sites on these to confirm.

Thanks,
Mike

Which O/S Linux Flavor do you recommend most?

till
30th June 2009, 10:36
Please make a post in the bugtracker http://bugtracker.ispconfig.org and we will take a look on this.

Which O/S Linux Flavor do you recommend most?

Debian Linux.

SamTzu
19th July 2009, 13:54
Could this be an issue with Jailkit?

till
19th July 2009, 14:16
Could this be an issue with Jailkit?

I dont think so as webalizer is run as root and has all priveliges to write files.

SamTzu
31st August 2009, 08:41
Plaahhh...

It's obvious in hindsight.
/etc/webalizer/webalizer.conf

Change the values for incremental and hostname if you suffer from this problem.


Incremental yes

# IncrementalName allows you to specify the filename for saving the
# incremental data in. It is similar to the HistoryName option where the
# name is relative to the specified output directory, unless an absolute
# filename is specified. The default is a file named "webalizer.current"
# kept in the normal output directory. If you don't specify "Incremental"
# as 'yes' then this option has no meaning.

#IncrementalName webalizer.current

# ReportTitle is the text to display as the title. The hostname
# (unless blank) is appended to the end of this string (seperated with
# a space) to generate the final full title string.
# Default is (for english) "Usage Statistics for".

ReportTitle Usage statistics for

# HostName defines the hostname for the report. This is used in
# the title, and is prepended to the URL table items. This allows
# clicking on URL's in the report to go to the proper location in
# the event you are running the report on a 'virtual' web server,
# or for a server different than the one the report resides on.
# If not specified here, or on the command line, webalizer will
# try to get the hostname via a uname system call. If that fails,
# it will default to "localhost".

HostName server47


If you have problems with stats make sure that...

1) You have created a password for the site on ISPConfig3
(User is admin) If this dont work then you get 500 error.
(Check the .htpasswd_stats file.)

server43: ls -ahl /var/www/shop.internet-content.net/ total 28K
drwxr-xr-x 6 root root 4.0K 2009-09-08 13:13 .
drwxr-xr-x 12 root root 4.0K 2009-09-04 13:20 ..
drwxr-xr-x 2 web22 client1 4.0K 2009-09-01 13:54 cgi-bin
-rw-rw-r-- 1 root root 40 2009-09-08 13:13 .htpasswd_stats
lrwxrwxrwx 1 web22 client1 50 2009-09-01 13:54 log -> /var/log/ispconfig/http /shop.internet-content.net
drwxr-xr-x 2 web22 client1 4.0K 2009-09-01 13:54 ssl
drwxrwxrwx 3 web22 client1 4.0K 2009-09-02 16:13 tmp
drwxr-xr-x 19 web22 client1 4.0K 2009-09-02 16:17 web


2) If you only can see 1 days worth of data make sure to edit /etc/webalizer/webalizer.conf
Incremental yes

3) If you have moved your site from ISPConfig2 server make sure that the web/stats/ folder does not contain any old .ht**** files.

4) If you have custom .htaccess file on your /web/ root try to rename it and see if the stats start to work.

Norm
30th November 2009, 02:50
Hello,

I installed ISPConfig a few days ago onto Ubuntu 9.10 64 bit and getting on fine with it after a few operator errors.

I've had the same problem with getting webalizer stats being produced just as previous writers mentioned.

I did notice in the ISPConfig cron.log that GEOip.dat could not be found at /usr/share/geoip so the ISPConfig cron.daily did not run properly. Seems this was not installed so I installed it with apt-get install geoip-database.

I ran the cron.daily script and my webalizer files are in the /stats folder now and I can access them as I should.

Sorry this is a few months late but I read through the forums and didn't see this mentioned as a possible solution.

Norm

abdi
5th November 2012, 10:04
My problem is even more weired ..

my /stats folder has ALL the files however I get 403 error when accessing them through the browser.

And funny thing is if I rename any of those files to .php then I can see its contents fine, seeming to me that .html is not working on my /stats/ folder ...

in the logs i have:

tail -f /var/www/clients/client1/web1/log/error.log

2012/11/05 08:32:54 [error] 2333#0: *3820 open() "/var/www/clients/client1/web1/.htpasswd_stats" failed (2: No such file or directory), client: 41.190.204.67, server: domain.net, request: "GET /stats/ HTTP/1.1", host: "www.domain.net"

2012/11/05 08:32:58 [error] 2333#0: *3832 open() "/var/www/clients/client1/web1/.htpasswd_stats" failed (2: No such file or directory), client: 41.190.204.67, server: jolis.net, request: "GET /stats/undefined HTTP/1.1", host: "www.domain.com", referrer:

abdi
5th November 2012, 10:39
OK, indeed that missing file is the root cause of all problems since when I disable it in /etc/nginx/sites-enabled

" auth_basic_user_file /var/www/clients/client1/web1/.htpasswd_stats;" everything works fine.

However if I try to manually create it with:

# touch /var/www/clients/client1/web1/.htpasswd_stats
touch: cannot touch `/var/www/clients/client1/web1/.htpasswd_stats': Permission denied

I get the above, implying my server is unable to create it and that explains why ALL sites can't show /stats/

Till any advice on why my system can't create that file in that path? Thanks

falko
6th November 2012, 13:51
What's the output of ls -la /var/www/clients/client1/web1/?

abdi
6th November 2012, 20:27
root@puck384 dbadmin # ls -la /var/www/clients/client1/web1/
total 2816
drwxr-xr-x 17 root root 4096 Oct 27 00:32 .
drwxr-xr-x 18 root root 4096 Oct 31 09:20 ..
drwxr-xr-x 2 web1 client1 4096 Oct 27 00:32 backup
-rwxr-xr-x 1 web1 client1 0 Oct 26 16:26 .bash_history
drwxr-xr-x 2 root root 4096 Oct 26 16:26 bin
drwxr-xr-x 2 web1 client1 4096 Oct 26 16:24 cgi-bin
drwxr-xr-x 2 root root 4096 Nov 6 08:05 dev
drwxr-xr-x 6 root root 4096 Oct 26 16:26 etc
drwxr-xr-x 4 root root 4096 Oct 26 16:26 home
drwxr-xr-x 3 root root 4096 Oct 26 16:26 lib
lrwxrwxrwx 1 root root 4 Oct 26 16:26 lib64 -> /lib
drwxr-xr-x 2 root root 4096 Nov 6 00:30 log
drwx--x--- 2 web1 client1 4096 Oct 26 16:24 private
drwx------ 2 web1 client1 4096 Oct 26 16:26 .ssh
drwxr-xr-x 2 root root 4096 Oct 26 18:18 ssl
drwxrwxrwx 2 web1 client1 2805760 Nov 6 18:25 tmp
drwxr-xr-x 6 root root 4096 Oct 26 16:26 usr
drwxr-xr-x 3 root root 4096 Oct 26 16:26 var
drwx--x--- 43 web1 client1 12288 Nov 6 10:05 web
root@puck384 dbadmin #

till
6th November 2012, 20:38
Till any advice on why my system can't create that file in that path? Thanks

The directory is protected to ensure that no user can create files there.

I guess you use the ispconfig beta and not a release version as the beta has a known bug in the stats password protection function which has already been fixed in svn.

abdi
17th November 2012, 11:00
Till, do kindly share with me the Beta SVN URL and or installation instructions ...Thanks

Till should I use this: svn://svn.ispconfig.org/ispconfig3/trunk/ ?

Edit: I used the above SVN and indeed the /stats/ issue is now resolved. Thanks ...

till
18th November 2012, 17:26
Till should I use this: svn://svn.ispconfig.org/ispconfig3/trunk/ ?

The stable branch which contains the fixes for ispconfig 3.0.5 is:

svn://svn.ispconfig.org/ispconfig3/branches/ispconfig-3.0.5

dicenl
2nd December 2012, 11:59
Just started with ispconfig 3.0.4.6 and loving it! i also dont have any stats. just joining the conversation and giving my config info:

Centos 6.3 x86_64
httpd apache
Followed the perfect server install (ispconfig 3 + courier ...)

Checks performed in previous posts:

# getenforce
Disabled
# which webalizer
/usr/bin/webalizer

ls -la /etc | grep webalizer
drwxr-xr-x 2 root root 4096 Dec 2 10:25 webalizer
-rw-r--r-- 1 root root 23734 Dec 2 10:25 webalizer.conf

ls -al /etc/webalizer
total 16
drwxr-xr-x 2 root root 4096 Dec 2 10:25 .
drwxr-xr-x. 124 root root 12288 Dec 2 10:25 ..
lrwxrwxrwx 1 root root 19 Nov 30 23:14 webalizer.conf -> /etc/webalizer.conf


ls -la /var/www/clients/client1/web8/
total 28
drwxr-x--x 6 web8 client1 4096 Dec 2 10:36 .
drwxr-xr-x 6 root root 4096 Dec 1 11:26 ..
drwxr-x--x 2 web8 client1 4096 Dec 1 10:16 cgi-bin
-rwxr-xr-x 1 root root 40 Dec 1 16:36 .htpasswd_stats
lrwxrwxrwx 1 root root 38 Dec 1 10:16 log -> /var/log/ispconfig/httpd/www.xxxx.nl
drwxr-x--x 2 web8 client1 4096 Dec 1 10:16 ssl
drwxrwxrwx 2 web8 client1 4096 Dec 1 20:06 tmp
drwx--x--- 7 web8 client1 4096 Dec 1 16:46 web

In sites / statistics have set admin password

Is there a way to force the creation of stats or do i realy have to wait 24 hours for it to happen automaticly?

falko
3rd December 2012, 10:42
You have to wait because webalizer/AWStats are configured to create stats from the previous day.

dicenl
3rd December 2012, 15:40
You have to wait because webalizer/AWStats are configured to create stats from the previous day.

ok, tnx! if i dont see any stats i will report back.

dicenl
3rd December 2012, 21:15
ok, im terrible in waiting :) did some more digging and found the cronjob being executed so i just executed the command at the commandline

/usr/bin/php -q /usr/local/ispconfig/server/cron_daily.php

now for the first time i saw content inside /web/stats folder and was able to see the site specific stats! yee :D For one of the sites there was an error. This is the only website i configured with the isp3 panel to use awstats. any suggestions on that error? or should i just be happy and use the webaliser stats?

PHP Warning: fileowner(): stat failed for /usr/lib/cgi-bin/awstats.pl in /usr/local/ispconfig/server/cron_daily.php on line 237
PHP Warning: rename(/var/www/clients/client1/web5/web/stats/awstats.forum.xxx.html,/var/www/clients/client1/web5/web/stats/awsindex.html): No such file or directory in /usr/local/ispconfig/server/cron_daily.php on line 240
finished.

till
3rd December 2012, 22:22
Which tutorianl did you use to install ispconfig?

dicenl
3rd December 2012, 22:31
This one.
http://www.howtoforge.com/perfect-server-centos-6.3-x86_64-apache2-courier-ispconfig-3

dicenl
4th December 2012, 15:08
Just a little update. i found a wrong path (on centos 6.3 x86_64 thats is) or a config boo-boo on my part ...

PHP Warning: fileowner(): stat failed for /usr/lib/cgi-bin/awstats.pl in /usr/local/ispconfig/server/cron_daily.php on line 237

it shoud go to

/usr/share/awstats/wwwroot/cgi-bin/awstats.pl

so i made a symlink. now thats one error gone, but i still have:

PHP Warning: rename(/var/www/clients/client1/web1/web/stats/awstats.www.xxx.html,/var/www/clients/client1/web1/web/stats/awsindex.html): No such file or directory in /usr/local/ispconfig/server/cron_daily.php on line 240

My php knowledge is not that great, but is i find whats wrong i will give an update.

till
4th December 2012, 15:12
The path to the awstats file is configurabe under system > server config > web. Please set it there to match your installation path of awstats.

The rename error will disappear after the next statistics run at night.

dicenl
4th December 2012, 15:40
ah! great. didnt had a look there yet. maybe a dumb question but you keep saying wait for stats overnight. why is that? isnt it possible to generate them with the script when you want?

and do i have to restart anything when i changed the awstats.pl path or it changed on the fly?

tnx for your help!

till
4th December 2012, 15:43
ah! great. didnt had a look there yet. maybe a dumb question but you keep saying wait for stats overnight. why is that? isnt it possible to generate them with the script when you want?

No, because the logs get rotated once a day and always the log fromyesterday is processed and awstats recognizzes when new records are there, so if you run the script more then once, nothing will happen.

and do i have to restart anything when i changed the awstats.pl path or it changed on the fly?

It will get changed in the settings and the settings are read when the script gets executed at night.

dicenl
4th December 2012, 16:49
ok. perfect! i will check it tomorrow and let you know.

dicenl
5th December 2012, 09:42
Argh! i was so hopefull this morning. checked the www.url.nl/stats but still no go. there is a pull down menu with "Jump to previous stats: 2012-12" In the websites stats folders there are only 2 files. The .htaccess, default install file and a index.php but thats it.

So again i run
/usr/bin/php -q /usr/local/ispconfig/server/cron_daily.php

and there still is a rename issue
UPDATE mail_traffic SET traffic = 5098189 WHERE traffic_id = 1PHP Warning: rename(/var/www/clients/client1/web1/web/stats/awstats.www.xxx.nl.html,/var/www/clients/client1/web1/web/stats/awsindex.html): No such file or directory in /usr/local/ispconfig/server/cron_daily.php on line 240
PHP Warning: rename(/var/www/clients/client1/web4/web/stats/awstats.gallery3.xxx.nl.html,/var/www/clients/client1/web4/web/stats/awsindex.html): No such file or directory in /usr/local/ispconfig/server/cron_daily.php on line 240

any suggestions?

By the way, this happens in 2 setups. I got one at home, my own private VM workstation home servers (with isp server os Centos 6.3 x86_64) and also at work on ESX 5i (also isp server os Centos 6.3 x86_64)

till
5th December 2012, 10:31
The rename error occurs because awstats has not created any statistics files, so the rename is not the issue here. Is the path to the awsats buildstaticpages script in ispconfig under system > server config correct?

dicenl
5th December 2012, 12:26
yeah, look like its okay.

output of all the awstats settings in the server config section:

]# ll /etc/awstats/
total 208
-rw-r--r-- 1 root root 199 Dec 5 08:50 awstats.digipeet.xxx.nl.conf
-rw-r--r-- 1 root root 190 Dec 5 08:50 awstats.forum.xxx.nl.conf
-rw-r--r-- 1 root root 199 Dec 5 08:50 awstats.gallery3.xxx.nl.conf
-rw-r--r-- 1 root root 61678 Nov 30 21:36 awstats.ispconfig1.xxx.nl.conf
-rw-r--r-- 1 root root 61665 Oct 7 2011 awstats.localhost.localdomain.conf
-rw-r--r-- 1 root root 61665 Oct 7 2011 awstats.model.conf
-rw-r--r-- 1 root root 184 Dec 5 08:50 awstats.www.xxx.nl.conf

# ll /var/lib/awstats/
total 92
-rw-r--r-- 1 root root 7122 Dec 2 13:01 awstats112012.ispconfig1.i-xxxl.txt
-rw-r--r-- 1 root root 7714 Dec 2 13:01 awstats112012.localhost.localdomain.txt
-rw-r--r-- 1 root root 36655 Dec 5 11:01 awstats122012.ispconfig1.xxx.txt
-rw-r--r-- 1 root root 37402 Dec 5 11:01 awstats122012.localhost.localdomain.txt

]# ll /usr/share/awstats/wwwroot/cgi-bin/awstats.pl
-rwxr-xr-x 1 root root 657790 Oct 16 2010 /usr/share/awstats/wwwroot/cgi-bin/awstats.pl

ll /usr/share/awstats/tools/awstats_buildstaticpages.pl
-rwxr-xr-x 1 root root 19594 Oct 7 2011 /usr/share/awstats/tools/awstats_buildstaticpages.pl

dicenl
5th December 2012, 15:13
okay, found it. the answer was in an other forum

http://www.howtoforge.com/forums/showthread.php?t=55417&page=2

cp /etc/awstats/awstats.model.conf /etc/awstats/awstats.conf