|
From: Joaquim H. <jo...@we...> - 2007-02-02 15:17:37
|
When creating a new virtual site, I've got most things licked, including integration with AWSTATS and an automated file protection set-up for the statistics. But one thing escapes me: where do I tell WM/VM which user it should add to the newly created domain group? Right now, it insists on adding the user "wwwrun" to by "foo.domain.com" group. But we never use RPM-installs for any server software we run, so we compile Apache from source, and have used another user/group .. I tried looking in the Apache module config page, but couldn't find it there, nor could I find it in VirtualMin's module config. -joho |
|
From: Joaquim H. <jo...@we...> - 2007-02-02 17:02:57
|
Found it.. under server templates. The selection "pop-up" did not, however, work. But entering "nobody" manually worked. Final remaining problem for me: the logs directory needs different handling, or rather the log files. I set AWSTATS to truncate/purge the log files after successful parse/update. I've told WM/VM to write the log files via a program to avoid problem with missing directory. But although the log file directory has proper permissions, the log files themselves are -rw-r--r and root.root, which means that the "wwwuser" (nobody, in my case) cannot purge/write to them, and nor can awstats. Ideas? -joho |
|
From: Jamie C. <jca...@we...> - 2007-02-02 17:18:06
|
On 2/Feb/2007 09:02 Joaquim Homrighausen wrote .. > Found it.. under server templates. The selection "pop-up" did not, however, > work. But entering "nobody" manually worked. Final remaining problem for > me: the logs directory needs different handling, or rather the log files. > I set AWSTATS to truncate/purge the log files after successful parse/update. > I've told WM/VM to write the log files via a program to avoid problem with > missing directory. But although the log file directory has proper permissions, > the log files themselves are -rw-r--r and root.root, which means that the > "wwwuser" (nobody, in my case) cannot purge/write to them, and nor can > awstats. Usually the truncation of log files in done on a Virtualmin system by logrotate. Any domain for which Apache is enabled should have an entry in /etc/logrotate.conf or /etc/logrotate.d/ to rotate it's log files. That way AWstats doesn't have to worry about it .. - Jamie |
|
From: Joaquim H. <jo...@we...> - 2007-02-02 18:55:25
|
But how do I automatically sync log rotation and the generation of awstats? If log rotation is to be used, awstats need to work on a rotated log. And what happens if it misses its run (for some reason) and then I've got two sets of log rotations to parse for statistics? For basic web sites, I'd like to just generate the statistics and be done with the log file. -joho |
|
From: Jamie C. <jca...@we...> - 2007-02-02 19:08:10
|
On 2/Feb/2007 10:55 Joaquim Homrighausen wrote .. > But how do I automatically sync log rotation and the generation of awstats? > If log rotation is to be used, awstats need to work on a rotated log. And > what happens if it misses its run (for some reason) and then I've got two > sets of log rotations to parse for statistics? > > For basic web sites, I'd like to just generate the statistics and be done > with the log file. Virtualmin always runs awstats on both the new and rotated versions of the log files, so that any records that were rotated since the last run will still be processed.. - Jamie |
|
From: Joaquim H. <jo...@we...> - 2007-02-02 19:33:22
|
For the record, I tried adding this:
Command to run after making changes to a server: "chown -R $HOME/logs ${USER}.root", but that didn't seem to have any effect.
-joho
|
|
From: Joaquim H. <jo...@we...> - 2007-02-02 19:40:38
|
Hmm.. VM has set-up the awstats schedule on a daily basis, whereas the log rotation is on a weekly basis.. and if I run the awstats generation manually for a virtual site, the stats seem to "double up" rather quickly, indicating that awstats cannot keep track of where it previously left of, thus generating duplicate stats. Where did I go wrong? -joho |
|
From: Jamie C. <jca...@we...> - 2007-02-02 21:15:15
|
On 2/Feb/2007 11:40 Joaquim Homrighausen wrote .. > Hmm.. VM has set-up the awstats schedule on a daily basis, whereas the > log rotation is on a weekly basis.. and if I run the awstats generation > manually for a virtual site, the stats seem to "double up" rather quickly, > indicating that awstats cannot keep track of where it previously left of, > thus generating duplicate stats. > > Where did I go wrong? That is odd - from my understanding, AWstats keeps track of the date it has read up to in the log, and won't re-process log entries from after that date. - Jamie |