Restricting access to specific subdirectories
Jonathan Matthews
contact at jpluscplusm.com
Sun Feb 3 11:53:09 UTC 2013
On 3 February 2013 03:27, jdiana <nginx-forum at nginx.us> wrote:
[snip]
> location ~ ^/my_ws$ {
[snip]
> However, if there's anything AFTER that (i.e. my_ws/, my_ws/page2,
> my_ws?parameter1, etc.) it allows them to proceed regardless of IP.
>
> I'm sure it's something required before or after the $, but I can't figure
> it out.
Your problem is absolutely to do with the "$", and if you don't yet
understand regex well enough to fix it, have a read through a simple
intro such as http://www.zytrax.com/tech/web/regex.htm#positioning.
BTW that's a pointer to the exact section you need, but I recommend
you digest at least the first half of that guide - it's not long or
difficult, and will serve you well in the future.
HTH,
Jonathan
--
Jonathan Matthews // Oxford, London, UK
http://www.jpluscplusm.com/contact.html
More information about the nginx
mailing list