Welcome! Log In Create A New Profile

Advanced

Re: deny directory abc denies directory abcd etc

August 07, 2012 03:10PM
On Tue, 2012-08-07 at 13:30 -0400, edtaa wrote:
> 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;}
>

Regex locations take precedence over literal locations. Change your
regex to this:

location ~ /(abc|def|ghi)/?$

Cliff


_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

deny directory abc denies directory abcd etc

edtaa August 07, 2012 01:30PM

Re: deny directory abc denies directory abcd etc

Cliff Wells August 07, 2012 03:10PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 54
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready