Added 'first' parameter to apache::sslsite
When set to true, ensures the site configuration is loaded first, thus becoming the default virtual host when NameVirtualHost (and SNI) is used.
This commit is contained in:
parent
3704a86d50
commit
68ac64b13f
3 changed files with 24 additions and 7 deletions
|
@ -219,7 +219,8 @@ class apache::redhat::sslserver {
|
|||
}
|
||||
|
||||
|
||||
define apache::redhat::sslsite($ipaddr, $root, $ssl_cert, $ssl_key, $ssl_chain) {
|
||||
define apache::redhat::sslsite($first, $ipaddr, $root,
|
||||
$ssl_cert, $ssl_key, $ssl_chain) {
|
||||
|
||||
if $name == "default" {
|
||||
$site_fqdn = $homename
|
||||
|
@ -293,8 +294,13 @@ define apache::redhat::sslsite($ipaddr, $root, $ssl_cert, $ssl_key, $ssl_chain)
|
|||
}
|
||||
}
|
||||
|
||||
$site_conf = "/etc/httpd/site.https.d/${site_fqdn}.conf"
|
||||
$site_confdir = "/etc/httpd/site.https.d/${site_fqdn}.d"
|
||||
if $first == true {
|
||||
$site_conf = "/etc/httpd/site.https.d/00-${site_fqdn}.conf"
|
||||
$site_confdir = "/etc/httpd/site.https.d/00-${site_fqdn}.d"
|
||||
} else {
|
||||
$site_conf = "/etc/httpd/site.https.d/${site_fqdn}.conf"
|
||||
$site_confdir = "/etc/httpd/site.https.d/${site_fqdn}.d"
|
||||
}
|
||||
|
||||
file { $site_conf:
|
||||
ensure => present,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue