In the past, when blogging, the server downtime, the Web page is not all out, but ping the server when it can ping. Login ssh looked down at top, stunned, average load 13 12 8. Do you think I'm being DDoS for a moment? Look at the next process is basically PHP-FPM CPU to take up, to see the log it ...
A look is very, basically is a user agent called "Yisouspider" things to brush screen, a look do not know which spider, too no moral integrity.
Find the root configuration area, add User Agent filter Judgment statement, found that "Yisouspider" direct return 403
Note 1: If you need to add more filters, do this
, the middle used | to separate the line
NOTE 2: If you are using a subdirectory blog, like mine, then find a section like "location/blog/" to modify
Location/{
... Other configuration
if ($http _user_agent ~* "Yisouspider") {return
403;
}
}
Configuration complete Wq Save reload after the Nginx, and then use the following command self test, address change. Did not install curl I have no way, oneself apt or yum to install a bar, artifact comes.
Curl-i-A "Yisouspider" www.slyar.com/blog/
See the return of 403 on it, indicating that the configuration was successful
PS: Some common reptiles of the user-agent, these generally do not filter the ~
Baidu Crawler
* baiduspider+ (+http://www.baidu.com/search/spider.htm ")
Google crawler
* MOZILLA/5.0 (compatible; googlebot/2.1; +http://www.google.com/bot.html)
* googlebot/2.1 (+http://www.googlebot.com/bot.html)
* googlebot/2.1 (+http://www.google.com/bot.html)
Yahoo crawler (Yahoo China and U.S. headquarters, respectively)
*mozilla/5.0 (compatible; Yahoo! Slurp; Http://misc.yahoo.com.cn/help.html ")
*mozilla/5.0 (compatible; Yahoo! Slurp; Http://help.yahoo.com/help/us/ysearch/slurp ")
Sina love to ask a reptile
*iaskspider/2.0 (+http://iask.com/help/help_index.html ")
*mozilla/5.0 (compatible; iaskspider/1.0; MSIE 6.0)
Sogou crawler
*sogou Web spider/3.0 (+http://www.sogou.com/docs/help/webmasters.htm#07″)
*sogou Push spider/3.0 (+http://www.sogou.com/docs/help/webmasters.htm#07″)
NetEase crawler
*mozilla/5.0 (compatible; yodaobot/1.0; Http://www.yodao.com/help/webmaster/spider/"; )
MSN Crawler
*msnbot/1.0 (+http://search.msn.com/msnbot.htm ")