[Puppet Users] apache::vhost add prefix to logfiles

Denny
Fri, 24 Oct 2014 07:32:28 -0000

Hi there,

this is - for sure - pretty easy to solve but I'm a bit stuck right now...

I want to add a prefix to my apache-vhost access and error logs depending
on what kind of application is installed on this vhost

Right now my config looks something like this:

apache::vhost { 'vhost.example.com':
  port            => '80',
  docroot         => '/var/www/html/someprettywebsite',
  serveradmin     => 'dontcallme@example.com',
}

which produces two log files:
/var/log/http/vhost.example.com_error.log
/var/log/http/vhost.example.com_access.log


but what I want is something like:

/var/log/http/wordpress_vhost.example.com_error.log
/var/log/http/wordpress_vhost.example.com_access.log

I've tried things like the example below, but didn't work :(

apache::vhost { 'vhost.example.com':
  port            => '80',
  docroot         => '/var/www/html/someprettywebsite',
  serveradmin     => 'dontcallme@example.com',
  access_log_file => "wordpress_${access_log_file}",
}


Any suggestions are welcome,

Denny

--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to puppet-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/aaaa0931-1ab3-462a-9441-2ded4a79a879%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.