From c7176c592622f3bc6955f36d359252e55c4e3d8d Mon Sep 17 00:00:00 2001 From: mh Date: Sat, 8 Oct 2011 23:53:15 +0200 Subject: log php errors to a per vhost logfile --- manifests/vhost/php/standard.pp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'manifests/vhost') diff --git a/manifests/vhost/php/standard.pp b/manifests/vhost/php/standard.pp index 7de2798..077bde4 100644 --- a/manifests/vhost/php/standard.pp +++ b/manifests/vhost/php/standard.pp @@ -92,6 +92,10 @@ define apache::vhost::php::standard( } else { $documentroot = "${real_path}/www" } + $logdir = $logpath ? { + 'absent' => "$real_path/logs", + default => $logpath + } $std_php_options = { smarty => false, @@ -120,6 +124,9 @@ define apache::vhost::php::standard( open_basedir => "${smarty_path}${pear_path}${documentroot}:/var/www/upload_tmp_dir/${name}:/var/www/session.save_path/${name}", safe_mode => 'On', } + if $logmode != 'nologs' { + $std_php_settings[error_log] = "${logdir}/php_error_log" + } if has_key($php_settings,'safe_mode_exec_dir') { $php_safe_mode_exec_dir = $php_settings[safe_mode_exec_dir] @@ -178,6 +185,7 @@ define apache::vhost::php::standard( 'fcgid': { include ::mod_fcgid include ::php::mod_fcgid + mod_fcgid::starter {$name: cgi_type => 'php', cgi_type_options => $real_php_settings, -- cgit v1.2.3