Apache LocationMatch不匹配
我试图设置请求限制某些敏感的URI在apache(v2.2)虚拟主机与mod_security ,但find使用LocationMatch麻烦。 到目前为止,configuration如下: <VirtualHost *:80> ServerName www.example.com RewriteEngine On DocumentRoot "/var/www/html/www.example.com" <Directory "/var/www/html/www.example.com"> Options None AllowOverride None Order allow,deny Allow from all </Directory> SecRuleEngine On # ignore requests from localhost or some other IP SecRule REMOTE_ADDR "^127\.0\.0\.2$" "phase:1,id:'1',nolog,allow" <LocationMatch "^\/RESTv2\/auth\..+"> SecRule REQUEST_FILENAME ".*" "phase:1,nolog,pass,initcol:ip=%{REMOTE_ADDR},setvar:ip.requests.auth=+1,id:'3',expirevar:ip.requests.auth=1" SecRule ip:requests.auth "@gt 2" "phase:1,pass,log,logdata:'blocking auth %{REMOTE_ADDR} req/sec: %{ip.requests}',setvar:ip.block.auth=1,expirevar:ip.block.auth=5,id:'4'" SecRule ip:block.auth […]