summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2014-04-14 22:54:24 +0200
committermh <mh@immerda.ch>2014-04-14 22:54:24 +0200
commitc52c48534d76b0a9c965784bd12eb1c1fccd94c6 (patch)
treefe7809e05cf0a222dc823ada82a87f0346d70d08 /templates
parentdf43214cdce1f474fa11ab1c1752fdd28a2ae19e (diff)
cleanup identation of if then else, especially for the produced file
Diffstat (limited to 'templates')
-rw-r--r--templates/vhosts/itk_plus/partial.erb24
-rw-r--r--templates/vhosts/partials/authentication.erb2
-rw-r--r--templates/vhosts/partials/header_default.erb2
-rw-r--r--templates/vhosts/partials/mod_security.erb12
-rw-r--r--templates/vhosts/partials/php_settings.erb25
-rw-r--r--templates/vhosts/partials/std_override_options.erb4
-rw-r--r--templates/vhosts/php_drupal/partial.erb2
-rw-r--r--templates/vhosts/php_joomla/partial.erb2
8 files changed, 37 insertions, 36 deletions
diff --git a/templates/vhosts/itk_plus/partial.erb b/templates/vhosts/itk_plus/partial.erb
index 5b05dd8..9c5a1ac 100644
--- a/templates/vhosts/itk_plus/partial.erb
+++ b/templates/vhosts/itk_plus/partial.erb
@@ -3,30 +3,30 @@
ProxyRequests off
<% if vhost_part == :ssl -%>
SSLProxyEngine On
- <%- if run_mode.to_s == 'static-itk' -%>
+<% if run_mode.to_s == 'static-itk' -%>
ProxyPassMatch ^/(.*\.<%= passing_extension %>/?.*)$ https://127.0.0.1/$1
- <%- else -%>
+<% else -%>
ProxyPass / https://127.0.0.1/
- <%- end -%>
+<% end -%>
ProxyPassReverse / https://127.0.0.1/
<% else -%>
- <% if run_mode.to_s == 'static-itk' -%>
+<% if run_mode.to_s == 'static-itk' -%>
ProxyPassMatch ^/(.*\.<%= passing_extension %>/?.*)$ http://127.0.0.1/$1
- <% else -%>
+<% else -%>
ProxyPass / http://127.0.0.1/
- <% end -%>
+<% end -%>
ProxyPassReverse / http://127.0.0.1/
-<% end %>
+<% end -%>
- <% if run_mode.to_s == 'static-itk' && (ssl_mode.to_s != 'force' || vhost_part == :ssl) -%>
+<% if run_mode.to_s == 'static-itk' && (ssl_mode.to_s != 'force' || vhost_part == :ssl) -%>
<Directory "<%= documentroot %>/">
AllowOverride <%= allow_override %>
- <% if options.to_s != 'absent' or do_includes.to_s == 'true' then -%>
- Options <% unless options.to_s == 'absent' then -%><%= options %><% end -%><% if do_includes.to_s == 'true' and not options.include?('+Includes') then -%> +Includes<% end -%>
+<% if options.to_s != 'absent' or do_includes.to_s == 'true' -%>
+ Options <% unless options.to_s == 'absent' -%><%= options %><% end -%><% if do_includes.to_s == 'true' and not options.include?('+Includes') -%> +Includes<% end -%>
- <% end -%>
+<% end -%>
<%= scope.function_template(['apache/vhosts/partials/authentication.erb']) %>
</Directory>
- <% end -%>
+<% end -%>
diff --git a/templates/vhosts/partials/authentication.erb b/templates/vhosts/partials/authentication.erb
index 6ca1b03..a6ebf3e 100644
--- a/templates/vhosts/partials/authentication.erb
+++ b/templates/vhosts/partials/authentication.erb
@@ -3,4 +3,4 @@
AuthName "Access fuer <%= servername %>"
AuthUserFile <%= real_htpasswd_path %>
require valid-user
-<% end -%> \ No newline at end of file
+<% end -%>
diff --git a/templates/vhosts/partials/header_default.erb b/templates/vhosts/partials/header_default.erb
index de707c9..398b0ce 100644
--- a/templates/vhosts/partials/header_default.erb
+++ b/templates/vhosts/partials/header_default.erb
@@ -12,7 +12,7 @@
<% unless documentroot == 'really_absent' -%>
DocumentRoot <%= documentroot %>/
<% end -%>
-<% if default_charset != 'absent' then -%>
+<% if default_charset != 'absent' -%>
AddDefaultCharset <%= default_charset %>
<% end -%>
<% if passing_extension != 'absent' -%>
diff --git a/templates/vhosts/partials/mod_security.erb b/templates/vhosts/partials/mod_security.erb
index 5b4fca8..f0602d8 100644
--- a/templates/vhosts/partials/mod_security.erb
+++ b/templates/vhosts/partials/mod_security.erb
@@ -1,11 +1,11 @@
<IfModule mod_security2.c>
-<% if mod_security.to_s == 'true' then -%>
+<% if mod_security.to_s == 'true' -%>
SecRuleEngine On
-<% if mod_security_relevantonly.to_s == 'true' then -%>
+<% if mod_security_relevantonly.to_s == 'true' -%>
SecAuditEngine RelevantOnly
-<% else -%>
+<% else -%>
SecAuditEngine On
-<% end -%>
+<% end -%>
<% else -%>
SecRuleEngine Off
SecAuditEngine Off
@@ -16,9 +16,9 @@
SecDebugLog <%= logdir %>/mod_security_debug.log
<% unless mod_security_rules_to_disable.to_a.empty? -%>
-<% mod_security_rules_to_disable.to_a.each do |rule| -%>
+<% mod_security_rules_to_disable.to_a.each do |rule| -%>
SecRuleRemoveById "<%= rule %>"
-<% end -%>
+<% end -%>
<% end -%>
<% unless mod_security_additional_options.to_s == 'absent' -%>
diff --git a/templates/vhosts/partials/php_settings.erb b/templates/vhosts/partials/php_settings.erb
index 7840987..fe55967 100644
--- a/templates/vhosts/partials/php_settings.erb
+++ b/templates/vhosts/partials/php_settings.erb
@@ -2,18 +2,19 @@
php_settings.reject{|k,v| v == :undef }.keys.sort.each do |key|
dvalue = php_settings[key].to_s.downcase
munged_value = if dvalue == 'true'
- 'on'
- elsif dvalue == 'false'
- 'off'
- elsif ['on','off'].include?(dvalue)
- dvalue
- else
- php_settings[key]
- end
- if ['on','off' ].include?(munged_value) -%>
+ 'on'
+ elsif dvalue == 'false'
+ 'off'
+ elsif ['on','off'].include?(dvalue)
+ dvalue
+ else
+ php_settings[key]
+ end
+
+ if ['on','off' ].include?(munged_value) -%>
php_admin_flag <%= key %> <%= munged_value %>
-<% else -%>
+<% else -%>
php_admin_value <%= key %> <%= munged_value %>
-<% end -%>
-<% end -%>
+<% end -%>
+<% end -%>
<% end -%>
diff --git a/templates/vhosts/partials/std_override_options.erb b/templates/vhosts/partials/std_override_options.erb
index 95a5e6a..a69250d 100644
--- a/templates/vhosts/partials/std_override_options.erb
+++ b/templates/vhosts/partials/std_override_options.erb
@@ -1,4 +1,4 @@
AllowOverride <%= allow_override %>
- <% if options.to_s != 'absent' || do_includes.to_s == 'true' || run_mode == 'fcgid' -%>
+<% if options.to_s != 'absent' || do_includes.to_s == 'true' || run_mode == 'fcgid' -%>
Options <%- unless options.to_s == 'absent' then -%><%= options %><% end -%><% if do_includes.to_s == 'true' && !options.include?('+Includes') -%> +Includes<% end -%><% if run_mode == 'fcgid' && !options.include?('+ExecCGI') -%> +ExecCGI<% end -%>
- <% end -%>
+<% end -%>
diff --git a/templates/vhosts/php_drupal/partial.erb b/templates/vhosts/php_drupal/partial.erb
index 3c420b1..10f1a30 100644
--- a/templates/vhosts/php_drupal/partial.erb
+++ b/templates/vhosts/php_drupal/partial.erb
@@ -1,7 +1,7 @@
<Directory "<%= documentroot %>/">
<%= scope.function_template(['apache/vhosts/partials/std_override_options.erb']) %>
-
+
<%= scope.function_template(['apache/vhosts/partials/authentication.erb']) %>
<%= scope.function_template(['apache/vhosts/partials/php_settings.erb']) %>
diff --git a/templates/vhosts/php_joomla/partial.erb b/templates/vhosts/php_joomla/partial.erb
index 3046129..89999e9 100644
--- a/templates/vhosts/php_joomla/partial.erb
+++ b/templates/vhosts/php_joomla/partial.erb
@@ -7,7 +7,7 @@
Include include.d/joomla.inc
</Directory>
-
+
<Directory "<%= documentroot %>/administrator/">
RewriteEngine on