ganglia简单认证

创建用户认证文件

htpasswd -c /etc/httpd/conf.d/passwords 用户名

创建文件.htaccess在路径/usr/share/ganglia下

内容:

AuthType Basic

AuthName "Restricted Files"

AuthUserFile /etc/httpd/conf.d/passwords

Require user 用户名

修改/etc/httpd/conf/httpd.conf中的内容

<Directory />

        Options FollowSymLinks

        AllowOverride None

</Directory>


<Directory />

        Options FollowSymLinks

        #  AllowOverride None

        AllowOverride AuthConfig

</Directory>

重启apache服务

service httpd restart


原文地址:https://www.cnblogs.com/AI001/p/3368888.html