how to install Mod_Security

anewday

Well-Known Member
#22
i typed SecAuditLog logs/audit_log at the bottom in rules , now whereis logs/audit_log ? it's in /var/logs/audit_log Or in /etc/modsecurity or another path ?

i'm so sorry for my cheap questions,
Best Regards
Where is your rules file? For example, if it is in /etc/modsecurity/ then the audit_log file will be in /etc/logs/audit_log
 
Last edited:
#23
my rules is in /etc/modsecurity2/ and loaded from /etc/httpd/conf/extra/httpd-includes.conf , so where is correct location ?

/etc/logs/audit_log didn't exist , this path ( or correct path ) will be create Or must be create manualy ?!

Best Regards
 
#26
You need to make the folder if it doens't exist. It should be in /etc/logs/audit_log
i do this , and i set chmod 777 for /etc/logs and for /etc/logs/audit_log ,

but after that i opened scriptet like c99 shell script and other part of my servers has problem with rules , but any thing wasn't in /etc/logs/audit_log

any idea !?
 

anewday

Well-Known Member
#30
Change the owner of the file to the same user that Apache is running as. If it still doesn't work then it could be due to the fact that mod_security 2 uses different syntax.
 
Last edited:
#33
[root@nvidia logs]# chown -R apache:apache *
[root@nvidia logs]# ls -la

drwxrwxrwx 2 root root 4096 Jul 24 17:00 .
drwxr-xr-x 49 root root 4096 Jul 28 18:51 ..
-rwxrwxrwx 1 apache apache 1 Jul 26 14:39 audit_log
[root@nvidia logs]#
everythings allright !? is any thing wrong with this ?
 

Cyber-DL

Active Member
#35
Correct is :

set full path in your rule files , here for example my log file is a logz and located in /etc/modsecurity2/logs

Code:
SecAuditLog /etc/modsecurity2/logs/logz
 
Top