Ok,

So when you call `access_log_file => “wordpress_${access_log_file}”` puppet is 
pulling $access_log_file from the scope in which you called apache::vhost what 
you probably want to do is something like:

$vhost_name = ‘vhost.example.com'
$vhost_type = ‘wordpress’

apache::vhost {$vhost_name:
  port            => 80,
  docroot         => "/var/www/html/${vhost_name}”,
  serveradmin     => ‘[email protected]’,
  access_log_file => “${vhost_type}_${vhost_name}_access.log”,
  error_log_file  => “${vhost_type}_${vhost_name}_error.log”
}

> On Oct 24, 2014, at 5:17 AM, Denny <[email protected]> wrote:
> 
> puppetlabs-apache (v1.1.1)
> 
> Am Freitag, 24. Oktober 2014 13:35:23 UTC+2 schrieb cwebber:
> Denny,
> 
> Which apache module are you using?
> 
> — cwebber
> 
>> On Oct 24, 2014, at 12:32 AM, Denny <[email protected] <javascript:>> 
>> wrote:
>> 
>> 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 <http://vhost.example.com/>':
>>   port            => '80',
>>   docroot         => '/var/www/html/someprettywebsite',
>>   serveradmin     => '[email protected] <javascript:>',
>> }
>> 
>> which produces two log files: 
>> /var/log/http/vhost.example.com <http://vhost.example.com/>_error.log 
>> /var/log/http/vhost.example.com <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 
>> <http://vhost.example.com/>_access.log
>> 
>> I've tried things like the example below, but didn't work :(
>> 
>> apache::vhost { 'vhost.example.com <http://vhost.example.com/>':
>>   port            => '80',
>>   docroot         => '/var/www/html/someprettywebsite',
>>   serveradmin     => '[email protected] <javascript:>',
>>   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 [email protected] <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/puppet-users/aaaa0931-1ab3-462a-9441-2ded4a79a879%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/puppet-users/aaaa0931-1ab3-462a-9441-2ded4a79a879%40googlegroups.com?utm_medium=email&utm_source=footer>.
>> For more options, visit https://groups.google.com/d/optout 
>> <https://groups.google.com/d/optout>.
> 
> 
> -- 
> 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 [email protected] 
> <mailto:[email protected]>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/298497a4-6140-4c52-b544-9c2a2c74b58c%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/puppet-users/298497a4-6140-4c52-b544-9c2a2c74b58c%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/2B21DE26-29DC-45A9-AEFF-A213970EFF48%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to