diff --git a/manifests/named_vhost.pp b/manifests/named_vhost.pp index 03a763180532ee13f7ee71eb6311362749e0d99e..4caaa0982effc87c9ea99d5ae2c62f595bcc7d2e 100644 --- a/manifests/named_vhost.pp +++ b/manifests/named_vhost.pp @@ -18,6 +18,7 @@ * Which hostnames in URLs this virtual host applies to. Translates * into 'ServerName' and 'ServerAlias' directives. Defaults to the * hostnames (before resolving) in the 'urls' parameter if not specified. + * This can be a single string, or a (possibly nested) list of strings. * * - certname * If set, specifies the basename of server certificate files, for diff --git a/templates/named_vhost.conf.erb b/templates/named_vhost.conf.erb index 9382aab35b7a2f9931812e4a8a203bb2729ddc0e..51321bf881d2788191cb2ac1381fe09f30dce208 100644 --- a/templates/named_vhost.conf.erb +++ b/templates/named_vhost.conf.erb @@ -1,5 +1,5 @@ <% - # Copyright (C) 2014-2020 Thomas Bellman. + # Copyright (C) 2014-2022 Thomas Bellman. # Licensed under the GNU LGPL v3+; see the README file for more information. httpd_version = scope.lookupvar('apache::standard_version') @@ -48,7 +48,7 @@ end end if @servernames != [] - server_names = @servernames + server_names = [@servernames].flatten end server_addrs.sort!.uniq! -%>