location /admin/ {
try_files $uri $uri/ /admin/index.html$args;
allow 192.168.0.0; # here goes the IP you want to allow
deny all;
}
Sumber: https://docs.rackspace.com/support/how-to/nginx-whitelisting-certain-ips/