deny directory abc denies directory abcd etc

edtaa nginx-forum at nginx.us
Tue Aug 7 17:30:55 UTC 2012


Hi
I'm new to this forum so I hope this hasn't come up before I didn't find
anything by searching.

I'm using the following to block access to multiple directories:

location ~ /(abc|def|ghi) { deny  all; access_log off; log_not_found
off; return 404;}

The problem I find is that if there is a file or directory beginning
with the same three characters, it too is blocked. So, for example, a
directory or file named abcd would also be blocked.

Is there a solution to this or is my code incorrect?

Thanks

Terry

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



More information about the nginx mailing list