Secure Nginx Directory But Not Files -


is there way require authentication view directory listings still allow public access files without authentication?

using sample code:

location / {   auth_basic           "closed site";   auth_basic_user_file conf/htpasswd;   autoindex on; } 

requires authentication on both files , directories.

not sure if work or not, try , tell me if works.

location ~ /$ {   auth_basic "closed site";   auth_basic_user_file conf/htpasswd;   autoindex on; } location / {   try_files $uri =404; } 

Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -