aboutsummaryrefslogtreecommitdiffstats
path: root/modules/apache
diff options
context:
space:
mode:
authorNicolas Vigier <boklm@mageia.org>2013-06-25 14:36:34 +0000
committerNicolas Vigier <boklm@mageia.org>2013-06-25 14:36:34 +0000
commit22291867510961252b08994fa5c82002a85528a7 (patch)
treec3bbe33e244f5585b9bd0300c6f55670abd67e0a /modules/apache
parentc3a04ab6608a610892ce76d3e474342c75fd174e (diff)
downloadpuppet-22291867510961252b08994fa5c82002a85528a7.tar
puppet-22291867510961252b08994fa5c82002a85528a7.tar.gz
puppet-22291867510961252b08994fa5c82002a85528a7.tar.bz2
puppet-22291867510961252b08994fa5c82002a85528a7.tar.xz
puppet-22291867510961252b08994fa5c82002a85528a7.zip
apache: move ssl vhost configuration in a separate file
Diffstat (limited to 'modules/apache')
-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 -%>