Want to subscribe to topics you're interested in?
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:
    2:30 AM
    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

    50,456
    11,659
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,078
    Local Time:
    9:00 AM
    Nginx 1.25.x
    MariaDB 10.x