looking in /usr/lib/cgi-bin instead of /etc/awstats
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
awstats (Ubuntu) |
New
|
Medium
|
Unassigned |
Bug Description
What I did:
# su - www-data
$ /usr/lib/
What I expected:
Create/Update database for config "/etc/awstats/
From data in log file ...
(etc etc etc)
What I see instead:
Error: LogFile parameter is not defined in config/domain file
Setup ('equius.mozai.com' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).
Other information:
$ pwd
/var/www
$ ls -l /etc/awstats/
-rw-r--r-- 1 root root 617 May 11 2012 /etc/awstats/
$ strace /usr/lib/
open("/
open("/
I expected the software to look in /etc/awstats/ for the config files, or maybe the current working directory, not /usr/lib/cgi-bin/. The documentation at https:/
ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: awstats 7.0~dfsg-5
Uname: Linux 2.6.32-042stab076.8 x86_64
ApportVersion: 2.0.1-0ubuntu17.2
Architecture: amd64
Date: Sun May 19 11:51:16 2013
MarkForUpload: True
PackageArchitec
ProcEnviron:
TERM=screen-
PATH=(custom, no user)
LANG=en_CA.UTF-8
SHELL=/bin/bash
SourcePackage: awstats
UpgradeStatus: Upgraded to precise on 2012-12-06 (163 days ago)
modified.
modified.
modified.
mtime.conffile.
mtime.conffile.
mtime.conffile.
Changed in awstats (Ubuntu): | |
importance: | Undecided → Medium |
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 cgi-bin/ awstats. pl -config= yourdomain. ext -update
/usr/lib/
I got:
Error: SiteDomain parameter not defined in your config/domain file. You must edit it for using this version of AWStats. awstats/ awstats. conf' file, web server or permissions) may be wrong.
Setup ('/etc/
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) usr/lib/ cgi-bin/ awstats. conf", O_RDONLY) = -1 ENOENT (No such file or directory) n.ext", O_RDONLY) = -1 ENOENT (No such file or directory) etc/awstats/ awstats. yourdomain. ext.conf" , O_RDONLY) = -1 ENOENT (No such file or directory) etc/awstats/ awstats. conf", O_RDONLY) = 3 etc/awstats/ awstats. conf.local" , O_RDONLY) = 4
open("/
open("yourdomai
open("/
open("/
open("/
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 awstats. conf" by AWStats version 7.0 (build 1.971) apache2/ access. log"...
Create/Update database for config "/etc/awstats/
From data in log file "/var/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.