PDA

View Full Version : Don't log request from load balancer checkhost-Tests


NoOne1337
07-23-2008, 12:18 PM
Hi,

I'm currently testing Litespeed and would like to change the access_log not to log checkhost-requests from my Loadbalancers.

On Apache I can do this like this:

SetEnvIf REMOTE_ADDR 192\.168\.1\.5 LB-request
SetEnvIf REMOTE_ADDR 192\.168\.1\.6 LB-request

CustomLog /var/log/apache/testhost.access_log combined env=!LB-request

How to configure this in the Litespeed config?


-- NoOne1337

mistwang
07-23-2008, 12:26 PM
You can use rewrite rule to do this by setting "dontlog" environment variable. like

RewriteCond %{REMOTE_ADDR} ^192\.168\.1\.(5|6)$
RewriteRule .* - [E=dontlog:1]

Enterprise Edition Only.