...
There are two approaches I am aware of and I personally only have figured out approach 1 where each virtual host has its own set of log files which I call "Virtual Host Based Logging" by reading the . Further information is at the Apache2 Log Files documentation. I am listing other approaches I found too.
- Virtual Host Based Logging
- Pro - Simple to understand. You use a packaged Apache program to rotate the logs.
- Pro - If you drop these files into the /etc/logrotate.d/apache2 with .log extensions they automatically rotate (provided you are using Ubuntu).
- Con - Not feasible when you have too many (how many is this?) as you run out of file descriptors.
- Use a single file and split among virtual hosts.
- You use an external program to both rotate and split the logs.
- Con - The technique used for access.log is not available for the error log (to reference why here) so is it reallly that good?
...