Applicable to:
- Plesk Onyx for Linux
- Plesk for Linux
Symptoms
-
Cannot enable modsecurity:
PLESK_ERROR: ASLCommon::cmd_exec ERROR: '(1) /usr/sbin/apache2ctl -t 2>&1 >/dev/null – [Tue May 07 12:41:20.419681 2019] [so:warn] [pid 25885:tid 140272553305984] AH01574: module security2_module is already loaded, skipping||[Tue May 07 12:41:20.419766 2019] [so:warn] [pid 25885:tid 140272553305984] AH01574: module unique_id_module is already loaded, skipping||AH00526: Syntax error on line 35 of /etc/apache2/modsecurity.d/rules/tortix/modsec/50_plesk_basic_asl_rules.conf:||ModSecurity: Found another rule with the same id'
-
There are extra configuration files in the
/etc/apache2/modsecurity.d/
directory, for example:# ls -la /etc/apache2/modsecurity.d/
total 672
drwxr-xr-x 4 root root 4096 May 8 11:07 .
drwxr-xr-x 10 root root 4096 May 7 10:50 ..
-rw-r--r-- 1 root root 0 Nov 7 02:38 000_vhost_exclude.conf
-rw-r--r-- 1 root root 651975 Oct 27 2018 50_plesk_basic_asl_rules.conf
-rw-r--r-- 1 root root 0 Nov 7 02:38 99_global_exclude.conf
drwxr-xr-x 2 root root 4096 Oct 23 2018 advanced
drwxr-xr-x 5 root root 4096 May 8 11:07 rules
-rw-r--r-- 1 root root 959 Oct 27 2018 sql.txt
-rw-r--r-- 1 root root 1098 Oct 27 2018 tortix_waf.conf
-rw-r--r-- 1 root root 231 May 8 11:07 zz_rules.conf
-rw-r--r-- 1 root root 231 May 8 11:07 zz_rules.conf.backup
Cause
Only zz_rules.conf
file and rules
directory should be in /etc/apache2/modsecurity.d/
directory
Resolution
-
Connect to the server via SSH;
-
Move necessary objects to another location, for example,
/root/
directory. - Enable ModSecurity.
Go to Plesk > Tools & Settings > Web Application Firewall (ModSecurity) and set Web application firewall mode to On
Comments
0 comments
Please sign in to leave a comment.