码迷,mamicode.com
首页 > 其他好文 > 详细

nginx auth

时间:2016-12-20 20:07:15      阅读:169      评论:0      收藏:0      [点我收藏+]

标签:rip   res   text   http   context   cat   ext   ssl   except   

location / {
    auth_basic           "closed site";##Context:httpserverlocationlimit_except
    auth_basic_user_file conf/htpasswd;##Context:httpserverlocationlimit_except
}
# printf "howhy:$(openssl passwd -crypt 123456)\n" >>conf/htpasswd
# cat conf/htpasswd
howhy:xyJkVhXGAZ8tM
systemctl restart nginx

nginx auth

标签:rip   res   text   http   context   cat   ext   ssl   except   

原文地址:http://www.cnblogs.com/howhy/p/6203662.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!