I have a server that runs a bunch of VirtualHosts for each of our client sites (~ 30 sites). I've got the VHosts configured so that each site has its own log, which is stored in <public>/../log/access.log
, and similarly for an error log.
I would like to create a server-wide log of some basic information from every request - specifically time, status code, and virtual host. Preferably, I would like to store this information in one file, rather than parsing each of the separate access logs.
Is there a way to tell Apache to follow one CustomLog
in addition to all the ones in the actual VHost files?
You can pipe the logs from CustomLog. You can then use
tee
, for instance, to send them to different destinations (possibly processing them beforehand). There's an example at fnal.gov: