您的位置:首页 > 理论基础 > 计算机网络

nginx用户认证配置( Basic HTTP authentication)

2017-02-10 12:04 477 查看
生成密码

$ htpasswd /file/conf/passwd <username>


配置

location / {
auth_basic "File server login (size 6)";
auth_basic_user_file /file/conf/passwd;

autoindex on;
autoindex_exact_size on;
autoindex_localtime on;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  nginx auth