splitting out to different files in customlog in mass vhost

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

My vhost config is at the bottom.  Today, it is writing a special log
format for all of my vhosts to a single file.  I would like to
separate them out into separate files based on my vhost.map or the
%{HOST}i or something similar.   I tried CustomLog
logs/%{HOST}i-access_log but it appears to not honor that variable in
the CustomLog context. Any ideas?   I can't do it on the backend
because I need my log files to be in common log format so the hostname
isn't included in that format.

Thanks!
Terry


<VirtualHost 10.0.1.37:80>
        ServerAdmin hostmaster@xxxxxxxxxx
        ServerName omajelws04.foobar.com
        Include conf/vhost_mass.conf
        LogFormat "%{Host}i %h %l %u %t \"%r\" %s %b" vcommon
        LogFormat "%h %l %u %t \"%r\" %>s %b" common
        LogFormat "%{Host}i %h %l %u %t \"%r\" %>s %b \"%{Referer}i\"
\"%{User-agent}i\"" vcombined
        CustomLog logs/shared_access_log vcombined
        CustomLog logs/common_access_log common
        RewriteEngine On
        RewriteMap lowercase int:tolower
        RewriteMap vhost txt:/etc/httpd/conf/vhost.map
        RewriteCond %{REQUEST_URI} !^/icons/
        RewriteCond %{REQUEST_URI} !^/cgi-bin/
        RewriteCond ${lowercase:%{SERVER_NAME}} ^(?:www\.)?(.+)$
        RewriteCond ${lowercase:%{SERVER_NAME}} ^(.+)$
        RewriteCond ${vhost:%1} ^(/.*)$
        RewriteRule ^/(.*)$ %1/$1
        RewriteCond %{REQUEST_URI} ^/cgi-bin/
        RewriteCond ${lowercase:%{SERVER_NAME}} ^(?:www\.)?(.+)$
        RewriteRule ^/(.*)$ /home/%1/cgi-bin/$1 [T=application/x-httpd-cgi]
        <Directory "/">
                AllowOverride All
        </Directory>
</VirtualHost>

---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux