I need to disallow access to xmlrpc.php server wide for anything but localhost by adding it to this template below.
No idea if I can add it to the existing such block that forbirds wp-login.php or should add new one?
Is that the most effective way to do it?
Sorry for the stupid question but I'm very new to nginx and need that urgently since the server is crashing every hour or so
and it's a sunny Saturday
	
	
	
		
	
			
			No idea if I can add it to the existing such block that forbirds wp-login.php or should add new one?
Is that the most effective way to do it?
Sorry for the stupid question but I'm very new to nginx and need that urgently since the server is crashing every hour or so
and it's a sunny Saturday
		Code:
	
	server {
    listen      %ip%:%proxy_port%;
    server_name %domain_idn% %alias_idn%;
    error_log  /var/log/%web_system%/domains/%domain%.error.log error;
    location / {
location ~ wp-login.php {
    allow 127.0.0.1;
    deny all;
     }
        proxy_pass      http://%ip%:%web_port%;
        location ~* ^.+\.(%proxy_extentions%)$ {
            root           %docroot%;
            access_log     /var/log/%web_system%/domains/%domain%.log combined;
            access_log     /var/log/%web_system%/domains/%domain%.bytes bytes;
            expires        max;
            try_files      $uri @fallback;
        }
    }
    location /error/ {
        alias   %home%/%user%/web/%domain%/document_errors/;
    }
    location @fallback {
        proxy_pass      http://%ip%:%web_port%;
    }
    location ~ /\.ht    {return 404;}
    location ~ /\.svn/  {return 404;}
    location ~ /\.git/  {return 404;}
    location ~ /\.hg/   {return 404;}
    location ~ /\.bzr/  {return 404;}
    include %home%/%user%/conf/web/nginx.%domain%.conf*;
}