summaryrefslogtreecommitdiff
path: root/templates/vhosts/default.erb
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2011-02-25 16:13:50 +0100
committermh <mh@immerda.ch>2011-02-25 16:13:50 +0100
commitfd87aeefb846f7986d936e07fee453fbb25d4833 (patch)
treebcd99db28619bb8fda5c0b054ba90043191396b8 /templates/vhosts/default.erb
parentef77991e5f8d3a05df8326fafbbfe346bc848c55 (diff)
cleanup rendering
Diffstat (limited to 'templates/vhosts/default.erb')
-rw-r--r--templates/vhosts/default.erb18
1 files changed, 9 insertions, 9 deletions
diff --git a/templates/vhosts/default.erb b/templates/vhosts/default.erb
index 22aa391..69af8f0 100644
--- a/templates/vhosts/default.erb
+++ b/templates/vhosts/default.erb
@@ -1,4 +1,4 @@
-<%-
+<%
vhost_parts = case ssl_mode
when 'only' then [:ssl]
when false then [:normal]
@@ -8,20 +8,20 @@ end
vhost_parts.each do |vhost_part|
scope.unsetvar('vhost_part')
scope.setvar('vhost_part',vhost_part)
-%>
+-%>
<VirtualHost *:<%= vhost_part == :ssl ? '443' : '80' %> >
- <%= scope.function_template('apache/vhosts/partials/header_default.erb') %>
+<%= scope.function_template('apache/vhosts/partials/header_default.erb') %>
- <%= scope.function_template('apache/vhosts/partials/logs.erb') %>
+<%= scope.function_template('apache/vhosts/partials/logs.erb') %>
- <%- if ssl_mode == 'force' && vhost_part == :normal %>
+ <% if ssl_mode == 'force' && vhost_part == :normal -%>
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule (.*) https://%{SERVER_NAME}$1 [R=permanent,L]
- <%- else %>
- <%= scope.function_template(template_partial) %>
- <%- end %>
+ <% else -%>
+<%= scope.function_template(template_partial) %>
+ <% end -%>
</VirtualHost>
-<%- end %>
+<% end -%>