Skip to content

Instantly share code, notes, and snippets.

@ShenXuGongZi
Created December 1, 2012 16:21
Show Gist options
  • Save ShenXuGongZi/4183086 to your computer and use it in GitHub Desktop.
Save ShenXuGongZi/4183086 to your computer and use it in GitHub Desktop.
location / {
auth_basic "Restricted";
auth_basic_user_file conf/htpasswd;
}
#auth_basic_user_file 指令为验证域指定了密码文件
#文件格式如下
user:pass
user2:pass2:comment
user3:pass3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment