Similar to protecting with Apache, here is how to do it using Nginx and its access module, ngx_http_access_module:xmlrpc.php
Please Login or Register to see this code
This simple directive blocks all access to by returning a 403 “Forbidden” response for all requests. Very lightweight and very effective.xmlrpc.php