API proxy: enable the proxy_connect module
AllowCONNECT directive is implemented by mod_proxy_connect since Apache 2.3.5 Therefore this module must be enabled before using the AllowCONNECT directive. Otherwise apache refuses to start due to invalid configuration command. blueprint support-ubuntu-trusty Closes-Bug: #1412347 Puppet Labs Ticket: https://tickets.puppetlabs.com/browse/MODULES-1684 Pull Request: https://github.com/puppetlabs/puppetlabs-apache/pull/987 Change-Id: I3777b328e919a0955639ded213fd314ad55d8146 Signed-off-by: Sergii Golovatiuk <sgolovatiuk@mirantis.com>
This commit is contained in:
parent
713c400f72
commit
914b5655e9
|
@ -0,0 +1,8 @@
|
|||
class apache::mod::proxy_connect (
|
||||
$apache_version = $::apache::apache_version,
|
||||
) {
|
||||
if versioncmp($apache_version, '2.4') >= 0 {
|
||||
Class['::apache::mod::proxy'] -> Class['::apache::mod::proxy_connect']
|
||||
::apache::mod { 'proxy_connect': }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe 'apache::mod::proxy_connect', :type => :class do
|
||||
let :pre_condition do
|
||||
[
|
||||
'include apache',
|
||||
'include apache::mod::proxy',
|
||||
]
|
||||
end
|
||||
context 'on a Debian OS' do
|
||||
let :facts do
|
||||
{
|
||||
:osfamily => 'Debian',
|
||||
:concat_basedir => '/dne',
|
||||
:operatingsystem => 'Debian',
|
||||
:id => 'root',
|
||||
:kernel => 'Linux',
|
||||
:path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
|
||||
}
|
||||
end
|
||||
context 'with Apache version < 2.4' do
|
||||
let :facts do
|
||||
super().merge({
|
||||
:operatingsystemrelease => '7.0',
|
||||
:lsbdistcodename => 'wheezy',
|
||||
})
|
||||
end
|
||||
let :params do
|
||||
{
|
||||
:apache_version => '2.2',
|
||||
}
|
||||
end
|
||||
it { is_expected.not_to contain_apache__mod('proxy_connect') }
|
||||
end
|
||||
context 'with Apache version >= 2.4' do
|
||||
let :facts do
|
||||
super().merge({
|
||||
:operatingsystemrelease => '8.0',
|
||||
:lsbdistcodename => 'jessie',
|
||||
})
|
||||
end
|
||||
let :params do
|
||||
{
|
||||
:apache_version => '2.4',
|
||||
}
|
||||
end
|
||||
it { is_expected.to contain_apache__mod('proxy_connect') }
|
||||
end
|
||||
end
|
||||
end
|
|
@ -13,6 +13,7 @@ class osnailyfacter::apache_api_proxy(
|
|||
}
|
||||
|
||||
class {"::apache::mod::proxy": }
|
||||
class {"::apache::mod::proxy_connect": }
|
||||
class {"::apache::mod::proxy_http": }
|
||||
|
||||
apache::vhost { 'apache_api_proxy':
|
||||
|
|
Loading…
Reference in New Issue