首页 > 其他 > 详细

Nginx的安全配置

时间:2018-09-26 22:40:54      阅读:159      评论:0      收藏:0      [点我收藏+]
nginx的安全配置

Nginx_auth_basic_module 简单认证

用"http basic authentication(简单的认证)"来限制用户的访问
一般的用法

location / {
auth_basic string;
auth_basic_user_file /etc/nginx/conf.d/htpasswd;
}

Syntax:     auth_basic string | off;
Default:    auth_basic off;
Context:    http, server, location, limit_except

使用基本的‘http basic authentication‘用户名和密码验证

Syntax: auth_basic_user_file file;
Default:    —
Context:    http, server, location, limit_except

指定保存的用户和密码,格式如下

comment
name1:password1
name2:password2:comment
name3:password3

关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!