apache2 下对/usr/local/share/lxr/目录设置认证访问控制,具体如下
可参考apache2.2 中文手册 -apache 认证、授权、访问控制http://lamp.linux.gov.cn/Apache/ApacheMenu/howto/auth.html
Alias /lxr /usr/local/share/lxr/
<Directory /usr/local/share/lxr/>
AllowOverride All
Options All
AuthType Basic
AuthName "By Invitation Only"
AuthUserFile /etc/apache2/passwd/passwords #创建密码文件
AuthGroupFile /etc/apache2/passwd/groups
Require user baiduyi #可访问的用户
</Directory>可参考apache2.2 中文手册 -apache 认证、授权、访问控制http://lamp.linux.gov.cn/Apache/ApacheMenu/howto/auth.html
本文介绍了如何在Apache2中为特定目录设置基于用户的认证访问控制。通过配置Alias和Directory指令,结合AuthType Basic实现对/usr/local/share/lxr/目录的安全访问。文中详细展示了配置示例,包括设置认证名称、指定密码文件位置以及限定可访问用户。
9333

被折叠的 条评论
为什么被折叠?



