Regex for excluding files from access log

#1
I thought there was this option, but I guess not. From searching I think enterprise litespeed has this option (that post was back in 2007!). You can place in your rewrite the dontlog tag to exclude certain file types from being logged in your access log. Any chance that could be added to OLS? Maybe even better would be the option to log different files types to different logs. Would help a lot with clutter. Thanks.
 
#5
The question is how do you use it? :p
I tried adding this to test in my rewrite log: RewriteRule .* - [E=dontlog:1]
Doesn't seem to work though. I got that from searching, but the sources are many years old so it might be something changed.
 
#6
in web admin console,
Virtual Hosts-> select your virtual host ->Rewrite->Enable Rewrite:Yes
then put
RewriteRule .* - [E=dontlog:1]
in "Rewrite Rules"

tested working in enterprise lsws, ols should be same steps.
 
#7
Hmm, I did exactly that a few days ago (tested again today), but everything was still being logged. I also tried removing all other lines from my rewrites in case of any conflicts, but no luck either.

Are you able to test OLS as well? I'm on latest CentOS if it makes a difference.
 
#8
following http://open.litespeedtech.com/mediawiki/index.php/Help:Repositories
yum install openlitespeed
I tested ols 1.3.8

it's half working by my test
1. change "Debug Level" from NONE to MEDIUM
web admin -> Server -> Log -> Debug Level: NONE to MEDIUM

2. in error.log, can see log entry like
2015-03-06 03:50:34.803 [DEBUG] [10.0.8.10:62013#Example] disable access log for this request.
it shows
RewriteRule .* - [E=dontlog:1]
is read and parsed.

3. but the request is still loged in access.log, as if above rewriterule not exist

so my conclusion from above tests, it's a bug.

4. but disable all the access log in virtual host -> Log -> Access Log -> Log Control: Disabled
does work -- all requests no longer log in access.log
 
Top