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.

Posted at Nginx Forum: 
http://forum.nginx.org/read.php?2,234600,257423#msg-257423

_______________________________________________
nginx mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx

Reply via email to