2017-08-04 75 views
1

为什么以下fail2ban regex为什么的fail2ban不匹配脚本没有找到

failregex = ^%(_apache_error_client)s ((AH001(28|30):)?File does not exist|(AH01264:)?script not found or unable to stat).*$ 
     ^%(_apache_error_client)s script '.*' not found or unable to stat 

不匹配

[client 111.111.111.111:51008] script '/srv/www/htdocs/wwwuni/fileadmin/Dokumente/index.php' not found or unable to stat 
+0

failregex是两行;第二行在stat之后开始),$ –

+0

也许你是否错过了第二行的'stat'之后的$? – OscarAkaElvis

+0

缺少的$不是问题。问题在于_apache_error_client的定义与 不一致 _apache_error_client = \ [[^]] * \] \ [(错误| \ S +:\ S +)\](\ [pid \ d +] )? \ [客户端(:\ d {1,5})?\] 至 _apache_error_client = \ [[^]] * \] \ [(:error | \ S +:\ S +)\](\ [pid \ d +])? \ [客户端(:\ d {1,5})?\] (:在错误前面) –

回答

0

我的问题是改变 _apache_error_client的定义,Apache的common.conf 后问题to _apache_error_client = [[^]] *] [(:error | \ S +:\ S +)]([pid \ d +])? [client(:\ d {1,5})?]

+0

好的,将其标记为已解决! – OscarAkaElvis

相关问题