在过去的几个小时里,我的服务器负载很重,主要是由于大量的加载请求.
我已经看到这一点归功于StatCounter实时统计数据,它显示“来自”页面是:
http://www.facebook.com/extern/login_status.PHP?api_key=3d34061e0ac6dc4dec21b35d2fb9d6d3&extern=0&channel=http%3A%2F%2Fwww.mysite.com%2F%3Fxd_receiver%3D1&locale=es_ES&sdk=edgar
登陆页面是
http://www.mysite.com/?xd_receiver=1#%7B%22id%22%3A0%2C%22sc%22%3A%22http%3A%2F%2Fwww.facebook.com%2Fxd_receiver_v0.4.PHP%22%2C%22sf%22%3A%22loginStatus%22%2C%22sr%22%3A2%2C%22h%22%3A%22loginServer%22%2C%22sid%22%3A%220.162%22%2C%22t%22%3A0%7D%5B0%2C%22loginStatus%22%2C%22InitLogin%22%2C%7B%22b
cpu,内存和带宽越来越高,我现在想,如果这可能是某种攻击.
这是一个带有WP 3.2.1的wordpress博客,基于Ubuntu 10.04.2 LTS,带有Nginx,PHP-FPM和APC.通常它运行得很好,但我担心这个请求正在加载服务器.
我唯一的解释是我有一个简单的Facebook Connect插件,允许用Facebook帐户进行评论,但直到现在它还没有给出任何问题.
奇怪的是,access.log显示来自不同IP的请求,所以我猜这不是攻击
164.77.106.237 - - [19/Oct/2011:18:20:53 +0200] "GET /?xd_receiver=1 HTTP/1.1" 403 189 "http://www.facebook.com/extern/login_status.PHP?api_key=3d34061e0ac6dc4dec21b35d2fb9d6d3&extern=0&channel=http%3A%2F%2Fwww.mysite.com%2F%3Fxd_receiver%3D1&locale=es_ES&sdk=edgar" "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; InfoPath.1)"
212.104.164.139 - - [19/Oct/2011:18:20:48 +0200] "GET /?xd_receiver=1 HTTP/1.1" 403 135 "http://www.facebook.com/extern/login_status.PHP?api_key=3d34061e0ac6dc4dec21b35d2fb9d6d3&extern=0&channel=http%3A%2F%2Fwww.mysite.com%2F%3Fxd_receiver%3D1&locale=es_ES&sdk=edgar" "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.1 (KHTML,like Gecko) Chrome/14.0.835.202 Safari/535.1"
etc.
在Nginx中是否可以阻止URL,例如匹配所有这些请求中的常量的api_key参数?
最佳答案
原文链接:https://www.f2er.com/nginx/435543.html