I have a server with whm/cpanel where I host several WordPress websites. Recently one of the websites was under a ddos atack on xml-rpc (xml-rpc.php
is a WordPress file). Here is the line from tail -f on access logs
******.58 - - [08/Oct/2015:12:32:34 +0200] "`POST /xmlrpc.php` HTTP/1.0" 403 - "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
For the moment, I renamed that file and blocked the IP (and install a plugin on all wp sites that disabled xml-rpc), but I was wondering if is something I can do server wide?
Thanks!
To disable xmlrpc.php file server wide you need to update your pre-VirtualHost Include file with the following code. You can update this file through WHM
<Files xmlrpc.php>
Order Deny,Allow
Deny from all
</Files>