nginx配置禁止抓包工具访问:
server {
if ($http_user_agent ~* ApacheBench|WebBench|java/){
return 403;
}
if ( $http_user_agent ~* (Wget|ab) ) {
return 403;
}
if ( $http_user_agent ~* LWP::Simple|BBBike|wget) {
return 403;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
location ~ /\.
{
deny all;
}
access_log /www/wwwlogs/access.log;
}
nginx配置禁止抓包工具访问:
在server当中配置禁止哪些工具抓包
if ($http_user_agent ~* ApacheBench|WebBench|java/){
return 403;
}
if ( $http_user_agent ~* (Wget|ab) ) {
return 403;
}
if ( $http_user_agent ~* LWP::Simple|BBBike|wget) {
return 403;
}
这样配置之后,一些常用的抓包工具就不能访问了!!