kvspb / nginx-auth-ldap

LDAP authentication module for nginx
BSD 2-Clause "Simplified" License
731 stars 251 forks source link

put require in 'server' or 'location' directive #159

Open zoide opened 7 years ago

zoide commented 7 years ago

It seems, that the 'require' option works only within a 'ldap_server' block.

Would it be possible to allow that directive in 'server', 'http', or a 'location' block?

This would enable nginx to have different require specs by vhost (lets say) without specifying a new 'ldap_server' block for each spec.

jandrieu commented 7 years ago

I have this same issue. I'd like to return a single non-restricted page for '/' and '/index.html', but have restrictions on all the other locations on the server. It doesn't seem possible to do that if the entire server has to be restricted.