summaryrefslogtreecommitdiff
path: root/templates/vhosts/default.erb
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2011-10-08 19:22:40 +0200
committermh <mh@immerda.ch>2011-10-08 19:22:40 +0200
commit2fa748dcc92e34b13bd4b6f7e452ef89b29490c4 (patch)
treef3827bd2c8cc3206b4f2a5a8a09b4951940d6cc4 /templates/vhosts/default.erb
parent24c047d1cfc54c003eef7445e177e28f373c1da4 (diff)
introduce a new template style, less duplicated things, more handy options
Diffstat (limited to 'templates/vhosts/default.erb')
-rw-r--r--templates/vhosts/default.erb19
1 files changed, 12 insertions, 7 deletions
diff --git a/templates/vhosts/default.erb b/templates/vhosts/default.erb
index 4acb6b4..5ab1d26 100644
--- a/templates/vhosts/default.erb
+++ b/templates/vhosts/default.erb
@@ -1,8 +1,7 @@
<%
vhost_parts = case ssl_mode
when 'only' then [:ssl]
- when false then [:normal]
- when 'false' then [:normal]
+ when false,'false' then [:normal]
else [:normal,:ssl]
end
vhost_parts.each do |vhost_part|
@@ -15,6 +14,12 @@ vhost_parts.each do |vhost_part|
<%= scope.function_template('apache/vhosts/partials/logs.erb') %>
+ <% if run_mode.to_s =~ /(proxy\-|static\-)?itk/ -%>
+ <IfModule mpm_itk_module>
+ AssignUserId <%= run_uid+" "+run_gid %>
+ </IfModule>
+
+ <% end -%>
<% if ssl_mode == 'force' && vhost_part == :normal -%>
RewriteEngine On
RewriteCond %{HTTPS} !=on
@@ -22,11 +27,11 @@ vhost_parts.each do |vhost_part|
<% else -%>
<%= scope.function_template(template_partial) %>
<% end -%>
-
+<%- unless template_partial == 'apache/vhosts/itk_plus/partial.erb' -%>
<%= scope.function_template('apache/vhosts/partials/mod_security.erb') %>
-
- <%- unless additional_options.to_s == 'absent' then -%>
+<% end -%>
+<% unless additional_options.to_s == 'absent' -%>
<%= additional_options %>
- <%- end -%>
-</VirtualHost>
<% end -%>
+</VirtualHost>
+<% end -%> \ No newline at end of file