diff --git a/scripts/openresty/install.sh b/scripts/openresty/install.sh index 402a264a..d5602f3a 100644 --- a/scripts/openresty/install.sh +++ b/scripts/openresty/install.sh @@ -363,6 +363,8 @@ http { server_tokens off; access_log off; + waf_http_status general=403 cc_deny=444; + # 服务状态页 server { listen 80; @@ -505,6 +507,63 @@ cat > ${openrestyPath}/html/stop.html << EOF EOF +# 写入 WAF 拦截页(战未来,暂时无法生效) +cat > ${openrestyPath}/html/block.html << EOF + + + + + + 请求被拦截 - 耗子Linux面板 + + + +
+

耗子Linux面板

+

本次请求判断为危险的攻击请求,已被拦截!

+

当您看到此页面,说明您的请求被WAF拦截,可能是由于您的请求中包含了危险的攻击内容,或者您的请求被误判为攻击请求。

+

如果您认为这是误判,请联系服务器管理员解决。

+
+ + +EOF + # 处理文件权限 chmod -R 755 ${openrestyPath} chmod -R 755 /www/wwwroot