I'm using apache 2.2 under linux. I want to have separate log files, and I have the following snnippet: [...] ######### LOGS FOO1.EXAMPLE.COM ########## RewriteCond %{HTTP_HOST} ^foo1.example.com$ RewriteRule ^ [E=foo1:1] CustomLog /var/log/httpd/logs/foo1/foo1.example.com_ssl_access_log common env=foo1 ######### LOGS FOO2.EXAMPLE.COM ########## RewriteCond %{HTTP_HOST} ^foo2\.example\.com$ RewriteRule ^ [E=foo2:1] CustomLog /var/log/httpd/logs/foo2/foo2.example.com_ssl_access.log common env=foo2 ######### LOGS FOO3.EXAMPLE.COM ########## RewriteCond %{HTTP_HOST} ^foo3\.example\.com$ RewriteRule ^ [E=foo3:1] CustomLog /var/log/httpd/logs/foo3/foo3.example.com_ssl_access.log common env=foo3 ErrorLog logs/ssl_error.log # It seems that enabling built-in access logs confuses/takes precedence over CustomLog directives, but I might be wrong #TransferLog logs/ssl_access.log LogLevel debug [...] I see in the rewrite log that the rewrites are exactly as expected, but I must be missing something. When restarting apache, the logs files are created with 0 size, for if it has any relevance.