Am 31.03.2015 um 19:49 schrieb Joe Jensen (ConAgra Foods):
Can anybody tell me a good way to include a date in the apache
configuration? For various reasons I’m trying to avoid |’s to logrotate
and want the date in a logfile’s name. I’m really hoping to put the
date into an apache variable I can use within the config.
A prior install involved running sed commands to update the config files
on apache startup (!!) which I’m trying to get rid of.
Define DATE ??
If you only need a date which is per startup, but does not change after the web server start:
In you start script or in envvars define and export a shell variable, e.g.
NOW=`date +%Y%m%d_%H%M%S`
export NOW
and then in the config you can use ${NOW}
Note that this will not update the timestamp if you do a "apachectl restart" or "apachectl graceful", only by stop and then start.
What is your reason you don't want to use piped logging?
Regards,
Rainer
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx