apache+mod_wsgi: Allow customizing wsgi process options
This change adds the missing capability to customize wsgi process options, which is supported by the other modules. Change-Id: Ia5cff022c1ad4f6402f2e9d4cd039059b176cd93
This commit is contained in:
parent
497d0a4e45
commit
a945887286
|
@ -98,6 +98,14 @@
|
|||
# (Optional) Sends the virtualhost error log messages to syslog.
|
||||
# Defaults to undef.
|
||||
#
|
||||
# [*custom_wsgi_process_options*]
|
||||
# (Optional) gives you the opportunity to add custom process options or to
|
||||
# overwrite the default options for the WSGI main process.
|
||||
# eg. to use a virtual python environment for the WSGI process
|
||||
# you could set it to:
|
||||
# { python-path => '/my/python/virtualenv' }
|
||||
# Defaults to {}
|
||||
#
|
||||
# [*headers*]
|
||||
# (optional) Headers for the vhost.
|
||||
# Defaults to undef
|
||||
|
@ -141,6 +149,7 @@ class placement::wsgi::apache (
|
|||
$error_log_file = undef,
|
||||
$error_log_pipe = undef,
|
||||
$error_log_syslog = undef,
|
||||
$custom_wsgi_process_options = {},
|
||||
$headers = undef,
|
||||
$request_headers = undef,
|
||||
$vhost_custom_fragment = undef,
|
||||
|
@ -178,6 +187,7 @@ class placement::wsgi::apache (
|
|||
wsgi_script_source => $::placement::params::wsgi_script_source,
|
||||
headers => $headers,
|
||||
request_headers => $request_headers,
|
||||
custom_wsgi_process_options => $custom_wsgi_process_options,
|
||||
access_log_file => $access_log_file,
|
||||
access_log_pipe => $access_log_pipe,
|
||||
access_log_syslog => $access_log_syslog,
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
features:
|
||||
- |
|
||||
The ``placement::wsgi::apache`` class now supports customizing wsgi process
|
||||
options, by the new ``custom_wsgi_process_options`` parameter.
|
|
@ -49,6 +49,9 @@ describe 'placement::wsgi::apache' do
|
|||
:path => '/custom',
|
||||
:ssl => true,
|
||||
:workers => 10,
|
||||
:custom_wsgi_process_options => {
|
||||
'python_path' => '/my/python/path',
|
||||
},
|
||||
:ssl_cert => '/etc/ssl/certs/placement.crt',
|
||||
:ssl_key => '/etc/ssl/private/placement.key',
|
||||
:ssl_chain => '/etc/ssl/certs/chain.pem',
|
||||
|
@ -94,6 +97,9 @@ describe 'placement::wsgi::apache' do
|
|||
:wsgi_script_source => platform_params[:wsgi_script_source],
|
||||
:headers => ['set X-XSS-Protection "1; mode=block"'],
|
||||
:request_headers => ['set Content-Type "application/json"'],
|
||||
:custom_wsgi_process_options => {
|
||||
'python_path' => '/my/python/path',
|
||||
},
|
||||
)}
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue