Add support for setenv parameter in apache

Change-Id: I0ac20540603d9682354b90f06a852a53d74767e3
This commit is contained in:
Takashi Kajinami
2020-09-06 23:37:13 +09:00
parent a7908b4bc4
commit 10af7893ed
3 changed files with 16 additions and 1 deletions

View File

@@ -51,6 +51,10 @@
# (Optional) The priority for the vhost.
# Defaults to '10'
#
# [*setenv*]
# (Optional) Set environment variables for the vhost.
# Defaults to []
#
# [*ssl*]
# (Optional) Use SSL.
# Defaults to false
@@ -217,12 +221,13 @@
#
define openstacklib::wsgi::apache (
$service_name = $name,
$servername = $::fqdn,
$bind_host = undef,
$bind_port = undef,
$group = undef,
$path = '/',
$priority = '10',
$servername = $::fqdn,
$setenv = [],
$ssl = false,
$ssl_ca = undef,
$ssl_cert = undef,
@@ -337,6 +342,7 @@ define openstacklib::wsgi::apache (
docroot_owner => $user,
docroot_group => $group,
priority => $priority,
setenv => $setenv,
setenvif => ['X-Forwarded-Proto https HTTPS=1'],
ssl => $ssl,
ssl_cert => $ssl_cert,

View File

@@ -0,0 +1,6 @@
---
features:
- |
The new ``openstacklib::wsgi::apache::setenv`` parameter has been added.
This paramaeter can be to define environment variables for vhost, passed
by httpd.

View File

@@ -74,6 +74,7 @@ describe 'openstacklib::wsgi::apache' do
:docroot => '/var/www/cgi-bin/keystone',
:docroot_owner => 'keystone',
:docroot_group => 'keystone',
:setenv => [],
:ssl => 'true',
:wsgi_daemon_process => {
'keystone_wsgi' => {
@@ -116,6 +117,7 @@ describe 'openstacklib::wsgi::apache' do
:bind_port => 4142,
:user => 'keystone',
:group => 'keystone',
:setenv => ['MYENV foo'],
:ssl => false,
:workers => 37,
:vhost_custom_fragment => 'LimitRequestFieldSize 81900',
@@ -133,6 +135,7 @@ describe 'openstacklib::wsgi::apache' do
:ip => '10.42.51.1',
:port => '4142',
:docroot => "/var/www/cgi-bin/keystone",
:setenv => ['MYENV foo'],
:ssl => 'false',
:wsgi_daemon_process => {
'keystone_wsgi' => {