#配置生效
server{
include /opt/www/nginx/conf/dropsql;
}
cat /opt/www/nginx/conf/dropsql
# Block common exploits
set $block_common_exploits 0;
#过滤alert
if ($query_string ~ .*alert.*) {
set $block_common_exploits 1;
}
#过滤script
if ($query_string ~ .*script.*) {
set $block_common_exploits 1;
}
#返回603
if ($block_common_exploits = 1) {
return 603;
}