Apache的HTTP基本身份验证? [英] Apache http basic authentication?

查看:477
本文介绍了Apache的HTTP基本身份验证?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一些简单的code,我可以添加到的.htaccess 文件或我的虚拟主机文件来执行HTTP基本认证?

Is there some simple code that I can add to an .htaccess file or my virtual host file to enforce http basic auth?

推荐答案

这个是什么?

AuthUserFile /my/derectory/.htpasswd
Require valid-user
AuthName "Secured Access"
AuthType Basic

为你最有趣的部分是需要有效的用户

但是,如果可以的话,请提供你为什么你试过做^^更多的信息

But if you can, please provide more informations about why you have you tried to do ^^

这篇关于Apache的HTTP基本身份验证?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆