An easy way to solve this issue is to create a "allowmyip.conf" file and include it anywhere you wish.
allowmyip.conf file :
allow 11.22.33.44
deny all;
Then in your server block :location ^~ /apc/ {
# Allow home
include /etc/nginx/allowmyip.conf;
}
This way it will be real easy to manage if your IP address changes. Just update your IP Address in the allowmyip.conf file and restart the server.