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

I would like Apache (version 2.2.3) to log according to the following rules:

  1. Do not log internal calls to self (127.0.0.1).
  2. Log access to /provisioning/ to provisioning_log.
  3. Log access to other pages of the VirtualHost to access_log.

My VirtualHost entry in httpd.conf says:

SetEnv LOGNORMAL 1
SetEnvIf Remote_Addr "127\.0\.0\.1" !LOGNORMAL
SetEnvIf Request_URI "^/provisioning/.*" LOGPROVISIONING !LOGNORMAL
SetEnvIf Request_URI "^/provisioning/" LOGPROVISIONING !LOGNORMAL
CustomLog logs/access_log "combinedWithHostname" env=LOGNORMAL
CustomLog logs/provisioning_log "combinedWithHostname" env=LOGPROVISIONING

<Directory "/var/www/provisioning">
Options +Indexes
</Directory>
Alias /provisioning "/var/www/provisioning"

However, browsing to http://<server>/provisioning/ page generates a log entry in both log files: provisioning_log (desired) and access_log (undesired).

What's wrong here?

share|improve this question

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.