Patch origin: in-house
Patch status: Solaris-specific; not suitable for upstream
Customize conf file for Solaris.
--- modsecurity-apache_2.7.5/modsecurity-24.conf-recommended 2014-09-18 11:02:07.894164052 +0000
+++ modsecurity-apache_2.7.5/modsecurity-24.conf-recommended 2014-09-18 11:02:55.661565764 +0000
@@ -1,3 +1,7 @@
+LoadModule security2_module libexec/mod_security2.so
+
+<IfModule mod_security2.c>
+
# -- Rule engine initialization ----------------------------------------------
# Enable ModSecurity, attaching it to every transaction. Use detection
@@ -129,13 +133,13 @@
# This default setting is chosen due to all systems have /tmp available however,
# this is less than ideal. It is recommended that you specify a location that's private.
#
-SecTmpDir /tmp/
+SecTmpDir /var/apache2/2.4/modsec/tmp/
# The location where ModSecurity will keep its persistent data. This default setting
# is chosen due to all systems have /tmp available however, it
# too should be updated to a place that other users can't access.
#
-SecDataDir /tmp/
+SecDataDir /var/apache2/2.4/modsec/tmp/
# -- File uploads handling configuration -------------------------------------
@@ -144,7 +148,7 @@
# location must be private to ModSecurity. You don't want other users on
# the server to access the files, do you?
#
-#SecUploadDir /opt/modsecurity/var/upload/
+#SecUploadDir /var/apache2/2.4/modsec/upload/
# By default, only keep the files that were determined to be unusual
# in some way (by an external inspection script). For this to work you
@@ -164,7 +168,7 @@
# The default debug log configuration is to duplicate the error, warning
# and notice messages from the error log.
#
-#SecDebugLog /opt/modsecurity/var/log/debug.log
+#SecDebugLog /var/apache2/2.4/logs/modsec_debug.log
#SecDebugLogLevel 3
@@ -184,10 +188,10 @@
# assumes that you will use the audit log only ocassionally.
#
SecAuditLogType Serial
-SecAuditLog /var/log/modsec_audit.log
+SecAuditLog /var/apache2/2.4/logs/modsec_audit.log
# Specify the path for concurrent audit logging.
-#SecAuditLogStorageDir /opt/modsecurity/var/audit/
+#SecAuditLogStorageDir /var/apache2/2.4/modsec/audit/
# -- Miscellaneous -----------------------------------------------------------
@@ -211,3 +221,4 @@
# version, Anonymous unique id for host.
SecStatusEngine On
+</IfModule>