summaryrefslogtreecommitdiff
path: root/templates/vhosts/partials
diff options
context:
space:
mode:
Diffstat (limited to 'templates/vhosts/partials')
-rw-r--r--templates/vhosts/partials/header_default.erb2
-rw-r--r--templates/vhosts/partials/ssl.erb5
2 files changed, 7 insertions, 0 deletions
diff --git a/templates/vhosts/partials/header_default.erb b/templates/vhosts/partials/header_default.erb
index 266fc79..cd4d04c 100644
--- a/templates/vhosts/partials/header_default.erb
+++ b/templates/vhosts/partials/header_default.erb
@@ -1,6 +1,8 @@
Include include.d/defaults.inc
<% if vhost_part == :ssl -%>
Include include.d/ssl_defaults.inc
+<%= scope.function_templatewlv(['apache/vhosts/partials/ssl.erb',
+ {'configuration' => configuration}]) %>
<% end -%>
ServerName <%= @servername %>
<% unless @serveralias.empty? || (@serveralias == 'absent') -%>
diff --git a/templates/vhosts/partials/ssl.erb b/templates/vhosts/partials/ssl.erb
new file mode 100644
index 0000000..24e28f5
--- /dev/null
+++ b/templates/vhosts/partials/ssl.erb
@@ -0,0 +1,5 @@
+ SSLCertificateFile <%= configuration['ssl_certificate_file'] || scope.lookupvar('apache::default_ssl_certificate_file') %>
+ SSLCertificateKeyFile <%= configuration['ssl_certificate_key_file'] || scope.lookupvar('apache::default_ssl_certificate_key_file') %>
+<% if configuration['ssl_certificate_chain_file'] || scope.lookupvar('apache::default_ssl_certificate_chain_file') != 'absent' -%>
+ SSLCertificateChainFile <%= configuration['ssl_certificate_chain_file'] || scope.lookupvar('apache::default_ssl_certificate_chain_file') %>
+<% end -%>