Currently we have 200+ virtualhosts setup and they have separate log files. I'm wondering what the advantages/disadvantages are of having a single log file and what the advantages/disadvantages of our current setup is (multiple log files for each virtualhost).
Asked
Active
Viewed 1,203 times
2 Answers
3
The most important disadvantage of one logfile per virtualhost is the number of open file descriptors. see httpd.apache.org/docs/2.0/vhosts/fd-limits.html for a description of the problem and possible alternatives.

heiko
- 1,733
- 1
- 12
- 6
2
One advantage to separate files per-vhost is to be able know which requests come from which host without having to deviate from the standard NCSA log format.
With everything logging to one file, the standard practice is to add a %v
to the beginning of the log format; this may choke some log parsing tools which don't understand it, as well as making it a bigger pain to dig for info (grep commands will need to be expanded to match the vhost as well) directly in the log file.

Shane Madden
- 114,520
- 13
- 181
- 251