Comment 2 for bug 1181790

Revision history for this message
Robie Basak (racb) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better.

I cannot reproduce this on awstats 7.0~dfsg-5 on Precise.

I did:

apt-get install awstats
/usr/lib/cgi-bin/awstats.pl -config=yourdomain.ext -update

I got:

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).

So it looks like awstats.pl is looking in /etc/awstats as expected.

strace -eopen lists the following relevant file open attempts:

open("/usr/lib/cgi-bin/awstats.yourdomain.ext.conf", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/cgi-bin/awstats.conf", O_RDONLY) = -1 ENOENT (No such file or directory)
open("yourdomain.ext", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/awstats/awstats.yourdomain.ext.conf", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/awstats/awstats.conf", O_RDONLY) = 3
open("/etc/awstats/awstats.conf.local", O_RDONLY) = 4

I then installed apache2, and set SiteDomain to "example.com" in /etc/awstats/awstate.conf.

Then:

# /usr/lib/cgi-bin/awstats.pl -config=example.com -update
Create/Update database for config "/etc/awstats/awstats.conf" by AWStats version 7.0 (build 1.971)
From data in log file "/var/log/apache2/access.log"...
Phase 1 : First bypass old records, searching new record...
Searching new records from beginning of log file...
Jumped lines in file: 0
Parsed lines in file: 0
 Found 0 dropped records,
 Found 0 comments,
 Found 0 blank records,
 Found 0 corrupted records,
 Found 0 old records,
 Found 0 new qualified records.

Note that www-data cannot read /var/log/apache2/ by default. Are you sure that your problem isn't just that you should be running awstats.pl -update as something that can read the logs? I just used the documentation you pointed to.

If this turns out to be a local misconfiguration, please change the bug status to Invalid. Otherwise, please set the bug status to New after you have responded.