Access to subfolder

I have site protected by password:
location / {
auth_basic …

}

but I need excluded some folder ex. /a/b/c/ from authentication

it is possible ?

Posted at Nginx Forum:

On Sat, Jul 14, 2012 at 9:59 PM, lukasz138 [email protected] wrote:

I have site protected by password:
location / {
auth_basic …

}

but I need excluded some folder ex. /a/b/c/ from authentication

it is possible ?

Yes. Just add another location where you don’t want to use
authentication, optionally prefixing it by ^~[1]:

location ^~ /a/b/c/ {

}
location / {
auth_basic …

}

[1] Module ngx_http_core_module

ok, but I want to access to any subfolder behind /a/b/c/, example
/a/b/c/d or /a/b/c/test.html . Any solution ?

Posted at Nginx Forum: