0

I am using nginx on my server. Now i am trying to allow ip to access xmlrpc.php file in wordpress nginx.conf file using below code.

location = /xmlrpc.php {
    allow XXX.XXX.XXX.XX; #example ip
    deny all;
    access_log off;
    log_not_found off;
}

But this is still not working. Can you please check what i am doing wrong in above

Addy
  • 101
  • 1
  • Your config looks fine. Have you checked the access log if you are allowing the correct IP? Are you using a proxy server? – Gerald Schneider Sep 26 '17 at 06:12
  • Please be more precise - not working how? Can everyone access it or can no-one? Please add any appropriate logs. You should include the Nginx site config in case something else is conflicting and it's not hitting that block. – Tim Sep 26 '17 at 07:49
  • No one can access this. I want it to accessible for particular IP – Addy Sep 26 '17 at 08:41
  • 2
    If you enable the access log, you may be able to see if the IP address you have is correct. In any event, the `location` block is missing the statements necessary to execute a PHP script. – Richard Smith Sep 26 '17 at 08:47
  • I have tried it not working but when i remove all code of deny code then this work. But allow ip not works – Addy Sep 26 '17 at 15:52

0 Answers0