【发布时间】:2015-09-15 13:30:32
【问题描述】:
Hadoop 的 NameNode 在端口 50070 (http://localhost:50070) 上有一个 Web UI,它始终可以通过浏览器访问。我想通过 .htaccess 或 httpd.conf 的基本身份验证对整个目录进行密码保护。然而,到目前为止,我所有的努力都是徒劳的。以下是我尝试过的示例:
<VirtualHost *:50070>
DocumentRoot /usr/hdp/2.2.0.0-2041/hadoop-hdfs/webapps/hdfs
<Location /explorer.html>
AuthUserFile path_to_passwords_file
AuthName "Password Protected"
AuthType Basic
Require user username
</Location>
</VirtualHost>
或
<Directory "/usr/hdp/2.2.0.0-2041/hadoop-hdfs/webapps/hdfs">
Options +Indexes
AuthType Basic
AuthName "Documents"
AuthUserFile path_to_passwords_file
Require user username
AllowOverride None
Order allow,deny
allow from all
</Directory>
我做错了什么?还有其他方法可以在该页面上设置密码保护吗?
谢谢。
【问题讨论】: