From 22291867510961252b08994fa5c82002a85528a7 Mon Sep 17 00:00:00 2001 From: Nicolas Vigier Date: Tue, 25 Jun 2013 14:36:34 +0000 Subject: apache: move ssl vhost configuration in a separate file --- modules/apache/templates/vhost_base.conf | 11 +---------- modules/apache/templates/vhost_ssl.conf | 10 ++++++++++ 2 files changed, 11 insertions(+), 10 deletions(-) create mode 100644 modules/apache/templates/vhost_ssl.conf (limited to 'modules/apache') 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 > <%- 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 -%> -- cgit v1.2.1