Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
    
Is it including things in directories under dir_2, but not the files inside the root of dir_2? –  WerkkreW May 15 '09 at 17:57
    
Its including both files under dir_2 and the subdirectories under dir_2. –  Brian Fisher May 15 '09 at 18:28

3 Answers 3

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

SkipFiles="REGEX[subdir_b$]"

share|improve this answer
    
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

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

share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.