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
I'm having a heck of a time setting allow / deny rules for certain
directories and files + getting Nginx to keep handling other location
rules.
For example, I want to only allow my IP address access to the WordPress
login page:
location ~* wp-login.php {
allow 22.131.12.14;
deny all;