Allow setting log files for apache vhost

This allows the setting of the error and access file logs, as well as
the access log format. This was done in a similar fashion as one can
configure these ones in the keystone wsgi manifest.

Change-Id: Ic2ffef73f6a12d6225f87d285003c3deb7541126
This commit is contained in:
Juan Antonio Osorio Robles 2017-10-06 14:23:53 +03:00
parent 5832f169d1
commit 781c75cebc
3 changed files with 24 additions and 2 deletions

View File

@ -69,6 +69,18 @@
# [*vhost_custom_fragment*]
# (optional) Additional vhost configuration, if applicable.
#
# [*access_log_file*]
# The log file name for the virtualhost.
# Optional. Defaults to false.
#
# [*access_log_format*]
# The log format for the virtualhost.
# Optional. Defaults to false.
#
# [*error_log_file*]
# The error log file name for the virtualhost.
# Optional. Defaults to undef.
#
# [*custom_wsgi_process_options*]
# (optional) gives you the oportunity to add custom process options or to
# overwrite the default options for the WSGI main process.
@ -104,6 +116,9 @@ define heat::wsgi::apache (
$threads = $::os_workers,
$priority = '10',
$vhost_custom_fragment = undef,
$access_log_file = false,
$access_log_format = false,
$error_log_file = undef,
$custom_wsgi_process_options = {},
) {
if $title !~ /^api(|_cfn|_cloudwatch)$/ {
@ -144,5 +159,8 @@ define heat::wsgi::apache (
allow_encoded_slashes => 'on',
require => Anchor['heat::install::end'],
vhost_custom_fragment => $vhost_custom_fragment,
access_log_file => $access_log_file,
access_log_format => $access_log_format,
error_log_file => $error_log_file,
}
}

View File

@ -20,7 +20,9 @@ describe 'heat::wsgi::apache_api_cfn' do
:ssl_certs_dir => nil,
:threads => facts[:os_workers],
:priority => 10,
:custom_wsgi_process_options => {}, )
:custom_wsgi_process_options => {},
:access_log_file => false,
:access_log_format => false,)
}
end
end

View File

@ -20,7 +20,9 @@ describe 'heat::wsgi::apache_api' do
:ssl_certs_dir => nil,
:threads => facts[:os_workers],
:priority => 10,
:custom_wsgi_process_options => {}, )
:custom_wsgi_process_options => {},
:access_log_file => false,
:access_log_format => false,)
}
end
end