首页 > FreeBSD > 解决WordPress被利用xmlrpc.php导致VPS CPU内存占用过高问题
2016
12-12

解决WordPress被利用xmlrpc.php导致VPS CPU内存占用过高问题

查看 nginx 访问日志

# cat /var/log/nginx/access.log

 

可以看到大量以下日志

191.96.249.80 - - [12/Dec/2016:09:12:32 +0000] "POST /xmlrpc.php HTTP/1.0" 404 1                                                                                                                     6 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
191.96.249.80 - - [12/Dec/2016:09:12:33 +0000] "POST /xmlrpc.php HTTP/1.0" 404 1                                                                                                                     6 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
191.96.249.80 - - [12/Dec/2016:09:12:33 +0000] "POST /xmlrpc.php HTTP/1.0" 404 1                                                                                                                     6 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
191.96.249.80 - - [12/Dec/2016:09:12:33 +0000] "POST /xmlrpc.php HTTP/1.0" 404 1                                                                                                                     

 

再查看一下访问错误日志

# cat /var/log/nginx/error.log

 

有大量访问错误日志

2016/12/12 08:37:35 [error] 65853#100166: *3331 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 191.96.249.80, server: *.mydoop.com, request: "POST /xmlrpc.php HTTP/1.0", upstream: "fastcgi://127.0.0.1:9000", host: "45.32.53.21"
2016/12/12 08:37:35 [error] 65853#100166: *3333 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 191.96.249.80, server: *.mydoop.com, request: "POST /xmlrpc.php HTTP/1.0", upstream: "fastcgi://127.0.0.1:9000", host: "45.32.53.21"

 

因为用不上xmlrpc.php 直接把 wordpress 目录下面的这个 xmlrpc.php 删除。

最后编辑:
作者:dnybz
这个作者貌似有点懒,什么都没有留下。