summaryrefslogtreecommitdiff
path: root/templates/vhosts/partials
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2011-03-17 13:17:10 +0100
committermh <mh@immerda.ch>2011-03-17 13:17:10 +0100
commit5d6a8d82224a63c61d61b3a71703b41809f235d3 (patch)
tree25b08a2b2294c2695d9945fddb6b4c6b289733b4 /templates/vhosts/partials
parentf614f355a6321285406fe7cb23a664e302e1d79c (diff)
put mod_security stuff in its own partial
Diffstat (limited to 'templates/vhosts/partials')
-rw-r--r--templates/vhosts/partials/mod_security.erb17
1 files changed, 17 insertions, 0 deletions
diff --git a/templates/vhosts/partials/mod_security.erb b/templates/vhosts/partials/mod_security.erb
new file mode 100644
index 0000000..0e0f803
--- /dev/null
+++ b/templates/vhosts/partials/mod_security.erb
@@ -0,0 +1,17 @@
+ <IfModule mod_security2.c>
+ <%- if mod_security.to_s == 'true' then -%>
+ SecRuleEngine On
+ <%- if mod_security_relevantonly.to_s == 'true' then -%>
+ SecAuditEngine RelevantOnly
+ <%- else -%>
+ SecAuditEngine On
+ <%- end -%>
+ <%- else -%>
+ SecRuleEngine Off
+ SecAuditEngine Off
+ <%- end -%>
+ SecAuditLogType Concurrent
+ SecAuditLogStorageDir <%= logdir %>/
+ SecAuditLog <%= logdir %>/mod_security_audit.log
+ SecDebugLog <%= logdir %>/mod_security_debug.log
+ </IfModule>