If parameter serveraliases for a vhost is defined as a string instead of an array, the resulting entries in the vhost config file consist of each character of that string.
If the string contains a wildcard it turns into a unwanted catchall vhost for some other vhosts.
The example below results in something like this:
## Server aliases
ServerAlias *
ServerAlias .
ServerAlias s
ServerAlias t
ServerAlias r
ServerAlias i
ServerAlias n
ServerAlias g
ServerAlias .
ServerAlias c
ServerAlias o
ServerAlias m
This bug was introduced with 12.0.0 and worked as expected until 11.1.0
Expected Behavior
the config files should remain untouched after an upgrade from 11.1.0 to 12.0.0 or 12.0.1
in this case:
## Server aliases
ServerAlias *.string.com
Steps to Reproduce
Steps to reproduce the behavior:
create a vhost like this:
apache::vhost { 'string.com':
servername => 'string.com',
serveraliases => '*.string.com',
}
run puppet on host, look in the resulting conf file.
Workaround
change parameter to array:
serveraliases => ['*.string.com'],
This is probably introduced in 31a137bcb490e6a9041959e8f7115dceac91d4c0, which rewrote the template to EPP. Those EPP rewrites introduced a lot of regressions.
Describe the Bug
If parameter serveraliases for a vhost is defined as a string instead of an array, the resulting entries in the vhost config file consist of each character of that string. If the string contains a wildcard it turns into a unwanted catchall vhost for some other vhosts. The example below results in something like this: ## Server aliases ServerAlias * ServerAlias . ServerAlias s ServerAlias t ServerAlias r ServerAlias i ServerAlias n ServerAlias g ServerAlias . ServerAlias c ServerAlias o ServerAlias m
This bug was introduced with 12.0.0 and worked as expected until 11.1.0
Expected Behavior
the config files should remain untouched after an upgrade from 11.1.0 to 12.0.0 or 12.0.1 in this case: ## Server aliases ServerAlias *.string.com
Steps to Reproduce
Steps to reproduce the behavior: create a vhost like this: apache::vhost { 'string.com': servername => 'string.com', serveraliases => '*.string.com', }
run puppet on host, look in the resulting conf file.
Workaround
change parameter to array: serveraliases => ['*.string.com'],
Environment
Additional Context
refs: https://forge.puppet.com/modules/puppetlabs/apache/reference#-apache--vhost--serveraliases serveraliases Data type: Variant[Array[String], String] Sets the ServerAliases of the site. Default value: []