2

I'm using AWStats and I want to ignore everything in a subdirectory except for a particular directory, here is the directory layout:

Webroot
 -dir_1
 -dir_2
 --subdir_a
 --subdir_b
 --subdir_c
 ...

I want to run statistics for everything in the web root excluding dir2 and all its subdirectories except subdir b. I've tried using the SkipFiles directive with :

SkipFiles="REGEX[^\/dir_2(!\/subdir_b)]"

But that is including everything under dir_2.

Brian Fisher
  • 621
  • 3
  • 10
  • 15

3 Answers3

1

Do you want to log stuff in dir_2 by default? Because I have certain directories turned off (like our keep-alive pages), so when I run awstats there are no log entries to parse. You should be able to turn off logging on dir_2, then turn it on for subdir_b, so those requests are logged. At least I've had that work in IIS (not sure with Apache, tho, it's been too long that I've been admining Windows web servers...).

Milner
  • 935
  • 7
  • 17
1

When you specify your logiles in the AWStats config you can specify a location but it can also be a pipe or something. Here's what we have locally: LogFile="C:\Inetpub\wwwroot\AWstats\cgi-bin\logresolvemerge.pl D:\importedLogfiles\raimonland\u_ex*.log |"

So, as long as your paths are static you should be able to chain together a bunch of these. Or you can write your own merge script to spit the files into AWStats.

Dan
  • 488
  • 1
  • 3
  • 16
1

If "subdir_b" is unique, perhaps you can try matching at the end of string.

SkipFiles="REGEX[subdir_b$]"

Dave K
  • 2,751
  • 2
  • 21
  • 17
  • Thanks for the suggestions, however, the subdir_b isn't unique. Also I want to include subdir_b and skip subdir_a, subdir_c, subdir_d, etc... Perhaps my original post is worded poorly. – Brian Fisher May 15 '09 at 17:56