我有以下设置:
location / {auth_basic "Private zone";auth_basic_user_file /user/.httpasswds;}和
location index.html {auth_basic off;}www.myserver.org/index.html无需基本身份验证对话框即可完美工作,
索引文件为index.html,但www.myserver.org或www.myserver.org/询问密码。
如何解决?谢谢。
发布于 2016-08-29 18:04:38
您需要接受/和/index.html的连接,而无需身份验证。
index index.html;
location = / { }
location = /index.html { }
location / {
auth_basic "Private zone";
auth_basic_user_file /user/.httpasswds;
}详情请参见this document。
https://stackoverflow.com/questions/39202621
复制相似问题