Welcome to Centmin Mod Community
Register Now

Nginx Limiting xml-rpc in wordpress to certain ips

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by amin, Dec 28, 2014.

  1. amin

    amin Member

    37
    6
    8
    Oct 11, 2014
    Ratings:
    +7
    Local Time:
    11:34 PM
    Katest
    Latest
    Hi,
    To avoid the xml-rpc attack, I wanted to limit xmlrpc.php file in my wordpress, I added this command to /usr/local/nginx/conf/conf.d/mydomain.com.conf :
    location ~ ^(xmlrpc\.php) { allow my ip range/18; deny all; }

    It is not working and I still can access to this file from any ip! Any idea?
     
  2. eva2000

    eva2000 Administrator Staff Member

    30,898
    6,908
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,403
    Local Time:
    6:04 AM
    Nginx 1.13.x
    MariaDB 5.5