We are working towards load balancing our amazon ec2 web servers running apache2. Until we get a better log system in place, we would like to have each instance simply write their server logs to a shared volume (shared using sshfs atm)
The problem we ran into is that if two instances are writing to the same shared log file (/shared-volume/access.log) some of our logs are clobbered due to the lack of file locking by sshfs
Since we want instances to be identical to each other, the short-term solution we thought of was to have apache log to /shared/log/apache2/[instance-ip]-access.log
Is this possible?
Tried this and other variants, but it seems the logfile is always statically interpreted.
CustomLog /shared/log/apache2/%{SERVER_ADDR}-access.log "%h %l %u %t \"%r\" %>s %b %D"