FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 11-11-2010, 07:15 AM
Zachary Uram
 
Default problem with awstats

Running Debian testing, installed awstats package and configured it
for use with my apache2 name-based virtual hosts (I have
/var/www/domain1.org, /var/www/domain2.org etc), but when I go to:
http://domain1.org/cgi-bin/awstats.pl or
http://domain2.org/cgi-bin/awstats.pl it gives the error:

Error: SiteDomain parameter not defined in your config/domain file.
You must edit it for using this version of AWStats.

Setup ('/etc/awstats/awstats.conf' file, web server or permissions)
may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).

I *do not* want it checking file /etc/awstats/awstats.conf! I setup
/etc/awstats/awstats.domain.conf for each domain so how can I force it
to use that?

Here is the relevant info from one of my /etc/awstats/awstats.domain.conf:

LogFile="/var/www/oggthebase.org/logs/access.log"
SiteDomain="oggthebase.org"
HostAliases="www.oggthebase.org"
DirData="/var/lib/awstats/oggthebase.org"

# ls -l /var/lib/awstats/oggthebase.org
total 32
-rw-r--r-- 1 root root 6322 Nov 10 23:17 awstats102010.oggthebase.org.txt
-rw-r--r-- 1 root root 12397 Nov 11 07:17 awstats112010.oggthebase.org.txt
-rw-r--r-- 1 root root 4853 Nov 11 04:17 dnscachelastupdate.oggthebase.org.hash

# ls -l /var/www/oggthebase.org/logs
total 96
-rw-r--r-- 1 root root 66306 Nov 11 08:05 access.log
-rw-r--r-- 1 root root 21056 Nov 11 02:14 error.log

BTW each hour cron runs this script:
/usr/share/doc/awstats/examples/awstats_updateall.pl
-awstatsprog=/usr/lib/cgi-bin/awstats.pl now > /dev/null
So it should be updating all of them and when I look at the DataDir
the stats appear to be there.

Zach

<>< http://www.fidei.org ><>


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: AANLkTi=CretSdzYdRVSnxbgVEFvc=DCaKDVXU_5+yO94@mail .gmail.com">http://lists.debian.org/AANLkTi=CretSdzYdRVSnxbgVEFvc=DCaKDVXU_5+yO94@mail .gmail.com
 
Old 11-11-2010, 07:23 AM
Zachary Uram
 
Default problem with awstats

I should add that also, per the awstats examples I found online, I
added this to my /etc/apache2/apache2.conf for awstats and restarted
apache2 before trying to retrieve any stats.

# make sure cgi-bin requests go to /usr/lib/cgi-bin
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/

# This provides worldwide access to everything below the directory
# Security concerns:
# * Raw log processing data is accessible too for everyone
# * The directory is by default writable by the httpd daemon, so if
# any PHP, CGI or other script can be tricked into copying or
# symlinking stuff here, you have a looking glass into your server,
# and if stuff can be uploaded to here, you have a public warez site!
<Directory /var/lib/awstats>
Options None
AllowOverride None
Order allow,deny
Allow from all
</Directory>

# This provides worldwide access to everything below the directory
# Security concerns: none known
<Directory /usr/share/awstats/icon>
Options None
AllowOverride None
Order allow,deny
Allow from all
</Directory>

# This provides worldwide access to everything below the directory
# Security concerns: none known
<Directory /usr/share/java/awstats>
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>

# This provides worldwide access to everything in the directory
# Security concerns: none known
Alias /awstats-icon/ /usr/share/awstats/icon/

# This provides worldwide access to everything in the directory
# Security concerns: none known
Alias /awstatsclasses/ /usr/share/java/awstats/

Zach

<>< http://www.fidei.org ><>


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: AANLkTinWF0hRgiTDePw403gSE7MHVuO6BvVfsJdCV5FT@mail .gmail.com">http://lists.debian.org/AANLkTinWF0hRgiTDePw403gSE7MHVuO6BvVfsJdCV5FT@mail .gmail.com
 
Old 11-11-2010, 07:38 AM
Zachary Uram
 
Default problem with awstats

BTW if I enter "http://www.oggthebase.org/cgi-bin/awstats.pl?config=oggthebase.org" it shows the statistics!
But if I enter "http://www.oggthebase.org/cgi-bin/awstats.pl?config=oggthebase.org" it gives the error I mentioned.


I would really like to be able to just go to "http://www.oggthebase.org/cgi-bin/awstats.pl" to get the statistics.
Any ideas what is wrong in my setup?



Zach

<>< http://www.fidei.org ><>
 
Old 11-11-2010, 08:23 AM
Camaleón
 
Default problem with awstats

On Thu, 11 Nov 2010 03:38:24 -0500, Zachary Uram wrote:

> BTW if I enter "
> http://www.oggthebase.org/cgi-bin/awstats.pl?config=oggthebase.org" it
> shows the statistics!

IIRC, that's the standard way for virtual hosting. You have to specify
the site you want to get the stats for.

> But if I enter "
> http://www.oggthebase.org/cgi-bin/awstats.pl?config=oggthebase.org" it
> gives the error I mentioned.

Both links are the same :-?

> I would really like to be able to just go to "
> http://www.oggthebase.org/cgi-bin/awstats.pl" to get the statistics. Any
> ideas what is wrong in my setup?

The normal setup for Awstats in multi-host environment is that (using the
"config=" parameter for each site), unless you want to install one
instance/copy of Awstats on each vhost >:-)

Greetings,

--
Camaleón


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: pan.2010.11.11.09.23.25@gmail.com">http://lists.debian.org/pan.2010.11.11.09.23.25@gmail.com
 
Old 11-11-2010, 08:53 AM
Zachary Uram
 
Default problem with awstats

Camaleón wrote:
>
> > BTW if I enter "
> > http://www.oggthebase.org/cgi-bin/awstats.pl?config=oggthebase.org"; it
> > shows the statistics!
>
> IIRC, that's the standard way for virtual hosting. You have to specify
> the site you want to get the stats for.

But all the awstats documentation I've read (that included in the
Debian package, stuff I found on google) says the other way should
work.

> > But if I enter "
> > http://www.oggthebase.org/cgi-bin/awstats.pl?config=oggthebase.org"; it
> > gives the error I mentioned.
>
> Both links are the same :-?

Sorry a mis-paste. I meant I get the error which I mentioned in my
first message if I enter: http://www.oggthebase.org/cgi-bin/awstats.pl
>From everything I've read this *should* work but it doesn't. Instead
it reads /etc/awstats/awstats.conf instead of reading
/etc/awstats/awstats.oggthebase.org.conf

/etc/awstats/awstats.conf should only be triggered if someone on the
local LAN entered the localhost name since the relevant entries in
/etc/awstats/awstats.conf are:
LogFile="/var/log/apache2/access.log"
SiteDomain="localhost"
HostAliases="localhost 127.0.0.1"
DirData="/var/lib/awstats"

Since I *only* use vhosts for my domains there is no one "SiteDomain"
for my web server. Thus I setup each of the separate .conf files for
each vhost. I'm not sure if awstats is expecting something else in
this default awstats.conf file or if some other part of the
configuration is in error. From everything I read I setup everything
correctly as detailed in my first message and the stats are generated
and are accessible using the
http://www.oggthebase.org/cgi-bin/awstats.pl?config=oggthebase.org
method but again from everything I've read documented the
http://www.oggthebase.org/cgi-bin/awstats.pl method should work. It
just bothers me that this doesn't work.

Zach

<>< http://www.fidei.org ><>


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: AANLkTikzRhx2Uft8BwjqSSjJF_4CarZnBo70zyoTMftS@mail .gmail.com">http://lists.debian.org/AANLkTikzRhx2Uft8BwjqSSjJF_4CarZnBo70zyoTMftS@mail .gmail.com
 
Old 11-11-2010, 09:25 AM
Camaleón
 
Default problem with awstats

On Thu, 11 Nov 2010 04:53:46 -0500, Zachary Uram wrote:

> Camaleón wrote:
>>
>> > BTW if I enter "
>> > http://www.oggthebase.org/cgi-bin/awstats.pl?config=oggthebase.org";
>> > it shows the statistics!
>>
>> IIRC, that's the standard way for virtual hosting. You have to specify
>> the site you want to get the stats for.
>
> But all the awstats documentation I've read (that included in the Debian
> package, stuff I found on google) says the other way should work.

I dont't think so.

Just think about it... how can Awstats know what host (config file) do
you want to use? It does not have a crystal ball ;-)

***
http://awstats.sourceforge.net/docs/awstats_setup.html

III. Run reports: Building and reading reports

(...)

2) The second option is to dynamically view your statistics from a
browser. To do this, use the URL:

http://www.myserver.mydomain/awstats/awstats.pl?config=mysite
^^^^^^^^^^^^^

where mysite specifies the configuration file to use (AWStats will use
the file awstats.mysite.conf).
***

If you don't define any site, it uses the default config template.

Greetings,

--
Camaleón


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: pan.2010.11.11.10.25.16@gmail.com">http://lists.debian.org/pan.2010.11.11.10.25.16@gmail.com
 
Old 11-11-2010, 12:39 PM
Jochen Schulz
 
Default problem with awstats

Camaleón:
> On Thu, 11 Nov 2010 04:53:46 -0500, Zachary Uram wrote:
>>
>> But all the awstats documentation I've read (that included in the Debian
>> package, stuff I found on google) says the other way should work.
>
> I dont't think so.
>
> Just think about it... how can Awstats know what host (config file) do
> you want to use? It does not have a crystal ball ;-)

But it sees the Host-header of the HTTP request and could look for a
file with that domain name in its name. Just a guess, though. I don't
know awstats.

J.
--
When I am doing sex I wonder if my emotions can be detected by alien
civilisations.
[Agree] [Disagree]
<http://www.slowlydownward.com/NODATA/data_enter2.html>
 
Old 11-11-2010, 01:57 PM
Camaleón
 
Default problem with awstats

On Thu, 11 Nov 2010 14:39:51 +0100, Jochen Schulz wrote:

> Camaleón:
>> On Thu, 11 Nov 2010 04:53:46 -0500, Zachary Uram wrote:
>>>
>>> But all the awstats documentation I've read (that included in the
>>> Debian package, stuff I found on google) says the other way should
>>> work.
>>
>> I dont't think so.
>>
>> Just think about it... how can Awstats know what host (config file) do
>> you want to use? It does not have a crystal ball ;-)
>
> But it sees the Host-header of the HTTP request and could look for a
> file with that domain name in its name. Just a guess, though. I don't
> know awstats.

I guess that would work only if "AllowToUpdateStatsFromBrowser" is set to
"true" (1).

But this variable should be handle with extremely care (I prefer having a
cron task managed by site admin and provide users with static stats
updated at defined intervals).

Greetings,

--
Camaleón


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: pan.2010.11.11.14.57.36@gmail.com">http://lists.debian.org/pan.2010.11.11.14.57.36@gmail.com
 

Thread Tools




All times are GMT. The time now is 04:20 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org