I wish to configure apache to ensure that the access and error logs produced from apache include are named the following:
<server-name>_access_<timestamp>
<server-name>_error_<timestamp>
I've the timestamp part determined using rotatelogs:
CustomLog logs/access_log combined
CustomLog "|bin/rotatelogs -l /var/logs/access_%Y-%m-%d 86400" common
The part which i cannot figulre out is how you can range from the server title within the filename. I'm setting up Apache on the linux box.
Regards, Mohan
Take a look at the mod_log_config documentation iIt appears like you would like either %v
or %V
:
%...v The canonical ServerName of the server serving the request.
%...V The server name according to the UseCanonicalName setting.