Take apache http and https ports as parameters
Changed apache http/https ports to be configurable. This can be used for example in cases where you have a load balancer listening to the default ports on the same host. The defaults are set to 80 for http and 443 for https, which were the hardcoded values. Change-Id: I9187a0abdbe9232667066d8c693985caf6481fa7
This commit is contained in:
parent
32569ef655
commit
1a52b5bb0d
|
@ -27,6 +27,12 @@
|
|||
# [*listen_ssl*]
|
||||
# (optional) Enable SSL support in Apache. (Defaults to false)
|
||||
#
|
||||
# [*http_port*]
|
||||
# (optional) Port to use for the HTTP virtual host. (Defaults to 80)
|
||||
#
|
||||
# [*https_port*]
|
||||
# (optional) Port to use for the HTTPS virtual host. (Defaults to 443)
|
||||
#
|
||||
# [*horizon_cert*]
|
||||
# (required with listen_ssl) Certificate to use for SSL support.
|
||||
#
|
||||
|
@ -75,6 +81,8 @@ class horizon::wsgi::apache (
|
|||
$servername = $::fqdn,
|
||||
$server_aliases = $::fqdn,
|
||||
$listen_ssl = false,
|
||||
$http_port = 80,
|
||||
$https_port = 443,
|
||||
$ssl_redirect = true,
|
||||
$horizon_cert = undef,
|
||||
$horizon_key = undef,
|
||||
|
@ -188,7 +196,7 @@ class horizon::wsgi::apache (
|
|||
alias => "${$::horizon::params::root_url}/static",
|
||||
path => '/usr/share/openstack-dashboard/static',
|
||||
}],
|
||||
port => 80,
|
||||
port => $http_port,
|
||||
ssl_cert => $horizon_cert,
|
||||
ssl_key => $horizon_key,
|
||||
ssl_ca => $horizon_ca,
|
||||
|
@ -224,7 +232,7 @@ class horizon::wsgi::apache (
|
|||
error_log_file => 'horizon_ssl_error.log',
|
||||
priority => $priority,
|
||||
ssl => true,
|
||||
port => 443,
|
||||
port => $https_port,
|
||||
ensure => $ensure_ssl_vhost,
|
||||
wsgi_daemon_process => 'horizon-ssl',
|
||||
wsgi_process_group => 'horizon-ssl',
|
||||
|
|
|
@ -43,6 +43,7 @@ describe 'horizon::wsgi::apache' do
|
|||
'serveraliases' => ['*'],
|
||||
'docroot' => '/var/www/',
|
||||
'ssl' => 'false',
|
||||
'port' => '80',
|
||||
'redirectmatch_status' => 'permanent',
|
||||
'redirectmatch_regexp' => '^/$',
|
||||
'redirectmatch_dest' => platforms_params[:root_url],
|
||||
|
@ -77,6 +78,7 @@ describe 'horizon::wsgi::apache' do
|
|||
'serveraliases' => ['*'],
|
||||
'docroot' => '/var/www/',
|
||||
'ssl' => 'false',
|
||||
'port' => '80',
|
||||
'redirectmatch_status' => 'temp',
|
||||
'redirectmatch_regexp' => '^/$',
|
||||
'redirectmatch_dest' => platforms_params[:root_url],
|
||||
|
@ -111,6 +113,7 @@ describe 'horizon::wsgi::apache' do
|
|||
'serveraliases' => ['*'],
|
||||
'docroot' => '/var/www/',
|
||||
'ssl' => 'true',
|
||||
'port' => '443',
|
||||
'ssl_cert' => '/etc/pki/tls/certs/httpd.crt',
|
||||
'ssl_key' => '/etc/pki/tls/private/httpd.key',
|
||||
'ssl_ca' => '/etc/pki/tls/certs/ca.crt',
|
||||
|
@ -130,6 +133,7 @@ describe 'horizon::wsgi::apache' do
|
|||
'serveraliases' => ['*'],
|
||||
'docroot' => '/var/www/',
|
||||
'ssl' => 'false',
|
||||
'port' => '80',
|
||||
'redirectmatch_status' => 'permanent',
|
||||
'redirectmatch_regexp' => '(.*)',
|
||||
'redirectmatch_dest' => 'https://some.host.tld',
|
||||
|
|
Loading…
Reference in New Issue