aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/apache/templates/vhost_base.conf11
-rw-r--r--modules/apache/templates/vhost_ssl.conf10
2 files changed, 11 insertions, 10 deletions
diff --git a/modules/apache/templates/vhost_base.conf b/modules/apache/templates/vhost_base.conf
index 2d89dccc..ad01d96f 100644
--- a/modules/apache/templates/vhost_base.conf
+++ b/modules/apache/templates/vhost_base.conf
@@ -7,16 +7,7 @@ end
<VirtualHost *:<%= port %>>
<%- if use_ssl then -%>
- SSLEngine on
- <%- if wildcard_sslcert == 'true' then -%>
- SSLCertificateFile /etc/ssl/wildcard.<%= domain %>.crt
- SSLCertificateKeyFile /etc/ssl/wildcard.<%= domain %>.key
- SSLCACertificateFile /etc/ssl/wildcard.<%= domain %>.pem
- SSLVerifyClient None
- <%- else -%>
- SSLCertificateFile /etc/ssl/apache/<%= real_vhost %>.pem
- SSLCertificateKeyFile /etc/ssl/apache/<%= real_vhost %>.pem
- <%- end -%>
+<%= scope.function_template(["apache/vhost_ssl.conf"]) %>
<%- end -%>
ServerName <%= real_vhost %>
<%- server_aliases.each do |key| -%>
diff --git a/modules/apache/templates/vhost_ssl.conf b/modules/apache/templates/vhost_ssl.conf
new file mode 100644
index 00000000..a26d2509
--- /dev/null
+++ b/modules/apache/templates/vhost_ssl.conf
@@ -0,0 +1,10 @@
+ SSLEngine on
+ <%- if wildcard_sslcert == 'true' then -%>
+ SSLCertificateFile /etc/ssl/wildcard.<%= domain %>.crt
+ SSLCertificateKeyFile /etc/ssl/wildcard.<%= domain %>.key
+ SSLCACertificateFile /etc/ssl/wildcard.<%= domain %>.pem
+ SSLVerifyClient None
+ <%- else -%>
+ SSLCertificateFile /etc/ssl/apache/<%= real_vhost %>.pem
+ SSLCertificateKeyFile /etc/ssl/apache/<%= real_vhost %>.pem
+ <%- end -%>