Skip to content

Commit

Permalink
correctly set serveraliases for the reverse proxy
Browse files Browse the repository at this point in the history
the correct parameter to `apache::vhost` is `serveraliases`, not
`aliases`. the later is for folder aliases and has totally different
syntax.

Fixes: 2f9ada4
  • Loading branch information
evgeni committed Jun 15, 2022
1 parent f355747 commit bbb8ac5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion manifests/reverse_proxy.pp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
apache::vhost { $vhost_name:
ensure => $ensure,
servername => $certs::apache::hostname,
aliases => $certs::apache::cname,
serveraliases => $certs::apache::cname,
port => $port,
docroot => '/var/www/',
priority => $priority,
Expand Down
6 changes: 3 additions & 3 deletions spec/defines/foreman_proxy_content__reverse_proxy_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
it do
is_expected.to contain_apache__vhost('my-reverse-proxy')
.with_servername(facts[:fqdn])
.with_aliases([])
.with_serveraliases([])
.with_port(8443)
.with_proxy_pass([{
'path' => '/',
Expand All @@ -37,7 +37,7 @@
it do
is_expected.to contain_apache__vhost('katello-reverse-proxy-443')
.with_servername('foo.example.com')
.with_aliases([])
.with_serveraliases([])
.with_port(443)
.without_keepalive # Not part of the vhost but used in the vhost_params
.with_proxy_pass([{
Expand Down Expand Up @@ -65,7 +65,7 @@ class { 'certs::apache':
it do
is_expected.to contain_apache__vhost('katello-reverse-proxy')
.with_servername('proxy.example.com')
.with_aliases(['proxy-01.example.com'])
.with_serveraliases(['proxy-01.example.com'])
end
end

Expand Down

0 comments on commit bbb8ac5

Please sign in to comment.