Alias /ganglia /usr/share/ganglia-webfrontend

<Location /ganglia>
    Order <%= node['ganglia']['web']['Order'] %>
<% node['ganglia']['web']['Deny'].each do |from_where| -%>
    Deny <%= from_where %>
<% end -%>
<% node['ganglia']['web']['Allow'].each do |from_where| -%>
    Allow <%= from_where %>
<% end -%>

<%
case node['ganglia']['web']['AuthType']
  when 'Basic'
-%>
    AuthType Basic
    AuthUserFile <%= node['ganglia']['web']['mod_auth_basic']['AuthUserFile'] %>
    Require valid-user
<%
  when 'Kerberos'
-%>
    AuthType Kerberos
    KrbAuthRealms <%= node['ganglia']['web']['mod_auth_kerb']['KrbAuthRealms'] %>
    KrbServiceName <%= node['ganglia']['web']['mod_auth_kerb']['KrbServiceName'] %>
    Krb5Keytab <%= node['ganglia']['web']['mod_auth_kerb']['Krb5Keytab'] %>
    KrbMethodNegotiate <%= node['ganglia']['web']['mod_auth_kerb']['KrbMethodNegotiate'] %>
    KrbMethodK5Passwd <%= node['ganglia']['web']['mod_auth_kerb']['KrbMethodK5Passwd'] %>
    Require valid-user
<% end -%>
</Location>

