Hi,
I want to filter my logs live, so that surtain addresses/information is
logged in different files. My problem is I can't get several rules to
apply of a file.
Here goes
httpd:conf
# Mark requests from: http://validator.w3.org
SetEnvIf Remote_Addr "18\.29\.1\.50" validator
# Mark requests from: http://server.htmlhelp.com
SetEnvIf Remote_Addr "64\.29\.16\.182" validator
CustomLog /usr/local/apache/logs/validator_log common env=validator
CustomLog /usr/local/apache/logs/access_log combined env=!validator
This works okay, 'validator' is now only logged in validator_log, so
lets try one more.
SetEnvIf Request_URI .png$ images
CustomLog /usr/local/apache/logs/images_log common env=images
CustomLog /usr/local/apache/logs/access_log combined env=!images
The images are logged to the image_log, but now access_log logs
everything, both 'validator' and 'images'. How can I tell access_log not
to log validator and images?
I've tried:
CustomLog /usr/local/apache/logs/access_log combined
env=!images,env=!validator
But this is not working... What am I doing wrong?
--
Magnus Østergaard
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
I want to filter my logs live, so that surtain addresses/information is
logged in different files. My problem is I can't get several rules to
apply of a file.
Here goes
httpd:conf
# Mark requests from: http://validator.w3.org
SetEnvIf Remote_Addr "18\.29\.1\.50" validator
# Mark requests from: http://server.htmlhelp.com
SetEnvIf Remote_Addr "64\.29\.16\.182" validator
CustomLog /usr/local/apache/logs/validator_log common env=validator
CustomLog /usr/local/apache/logs/access_log combined env=!validator
This works okay, 'validator' is now only logged in validator_log, so
lets try one more.
SetEnvIf Request_URI .png$ images
CustomLog /usr/local/apache/logs/images_log common env=images
CustomLog /usr/local/apache/logs/access_log combined env=!images
The images are logged to the image_log, but now access_log logs
everything, both 'validator' and 'images'. How can I tell access_log not
to log validator and images?
I've tried:
CustomLog /usr/local/apache/logs/access_log combined
env=!images,env=!validator
But this is not working... What am I doing wrong?
--
Magnus Østergaard
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org