summaryrefslogtreecommitdiff
path: root/templates/vhosts/partials
diff options
context:
space:
mode:
Diffstat (limited to 'templates/vhosts/partials')
-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
5 files changed, 23 insertions, 22 deletions
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 -%>