Join the community today
Become a Member

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

    38
    6
    8
    Oct 11, 2014
    Ratings:
    +7
    Local Time:
    1:19 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

    55,197
    12,251
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,829
    Local Time:
    7:49 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+