From 58847f6375cffe9c1018a7b51d5062b86796a534 Mon Sep 17 00:00:00 2001 From: mh Date: Wed, 18 May 2011 00:13:25 +0200 Subject: move header to partials --- templates/vhosts/webdav/webdav.erb | 65 ++++++-------------------------------- 1 file changed, 10 insertions(+), 55 deletions(-) (limited to 'templates/vhosts/webdav/webdav.erb') diff --git a/templates/vhosts/webdav/webdav.erb b/templates/vhosts/webdav/webdav.erb index 61ac41d..4b44298 100644 --- a/templates/vhosts/webdav/webdav.erb +++ b/templates/vhosts/webdav/webdav.erb @@ -4,16 +4,7 @@ <%- end -%> <%- unless ssl_mode.to_s == 'only' then -%> - Include include.d/defaults.inc - - ServerName <%= servername %> - <%- unless serveralias.to_s.empty? then -%> - ServerAlias <%= serveralias %> - <%- end -%> - <%- unless server_admin.to_s.empty? or server_admin.to_s == 'absent' then -%> - ServerAdmin <%= server_admin %> - <%- end -%> - DocumentRoot <%= documentroot %>/ +<%= scope.function_template('apache/vhosts/partials/header_default.erb') %> <%= scope.function_template('apache/vhosts/partials/logs.erb') %> @@ -23,10 +14,7 @@ RewriteRule (.*) https://%{SERVER_NAME}$1 [R=permanent,L] <%- end -%> - <%- if default_charset.to_s != 'absent' then -%> - AddDefaultCharset <%= default_charset %> - <%- end -%> <%- if run_mode.to_s =~ /(proxy\-|static\-)?itk/ -%> AssignUserId <%= run_uid+" "+run_gid %> @@ -69,23 +57,12 @@ <%- unless ssl_mode.to_s == 'false' then -%> - Include include.d/defaults.inc - Include include.d/ssl_defaults.inc - - ServerName <%= servername %> - <%- unless serveralias.to_s.empty? then -%> - ServerAlias <%= serveralias %> - <%- end -%> - <%- unless server_admin.to_s.empty? or server_admin.to_s == 'absent' then -%> - ServerAdmin <%= server_admin %> - <%- end -%> - DocumentRoot <%= documentroot %>/ +<% scope.unsetvar('vhost_part') + scope.setvar('vhost_part',:ssl) -%> + <%= scope.function_template('apache/vhosts/partials/header_default.erb') %> +<% scope.unsetvar('vhost_part') -%> <%= scope.function_template('apache/vhosts/partials/logs.erb') %> - <%- if default_charset.to_s != 'absent' then -%> - - AddDefaultCharset <%= default_charset %> - <%- end -%> <%- if run_mode.to_s =~ /(proxy\-|static\-)?itk/ -%> @@ -129,15 +106,7 @@ <%- unless ssl_mode.to_s == 'only' then -%> - Include include.d/defaults.inc - - ServerName <%= servername %> - <%- unless serveralias.to_s.empty? then -%> - ServerAlias <%= serveralias %> - <%- end -%> - <%- unless server_admin.to_s.empty? or server_admin.to_s == 'absent' then -%> - ServerAdmin <%= server_admin %> - <%- end -%> +<%= scope.function_template('apache/vhosts/partials/header_default.erb') %> <%= scope.function_template('apache/vhosts/partials/logs.erb') %> @@ -151,10 +120,6 @@ RewriteCond %{HTTPS} !=on RewriteRule (.*) https://%{SERVER_NAME}$1 [R=permanent,L] - <%- end -%> - <%- if default_charset.to_s != 'absent' then -%> - AddDefaultCharset <%= default_charset %> - <%- end -%> <%= scope.function_template('apache/vhosts/partials/mod_security.erb') %> @@ -166,16 +131,10 @@ <%- unless ssl_mode.to_s == 'false' then -%> - Include include.d/defaults.inc - Include include.d/ssl_defaults.inc - - ServerName <%= servername %> - <%- unless serveralias.to_s.empty? then -%> - ServerAlias <%= serveralias %> - <%- end -%> - <%- unless server_admin.to_s.empty? or server_admin.to_s == 'absent' then -%> - ServerAdmin <%= server_admin %> - <%- end -%> +<% scope.unsetvar('vhost_part') + scope.setvar('vhost_part',:ssl) -%> + <%= scope.function_template('apache/vhosts/partials/header_default.erb') %> +<% scope.unsetvar('vhost_part') -%> <%= scope.function_template('apache/vhosts/partials/logs.erb') %> @@ -184,10 +143,6 @@ SSLProxyEngine On ProxyPass / https://127.0.0.1/ ProxyPassReverse / https://127.0.0.1/ - <%- if default_charset.to_s != 'absent' then -%> - - AddDefaultCharset <%= default_charset %> - <%- end -%> <%= scope.function_template('apache/vhosts/partials/mod_security.erb') %> -- cgit v1.2.3