ScriptAlias /nagios/cgi-bin/ /usr/lib64/nagios/cgi-bin/

# noc2
ScriptAlias /nagios-external/cgi-bin/ /usr/lib64/nagios/cgi-bin/

# test
ScriptAlias /nagios-just-a-test/cgi-bin/ /usr/lib64/nagios/cgi-bin/

ScriptAlias	/tac.cgi	/usr/lib64/nagios/cgi-bin/tac.cgi

<Location ~ "/(nagios|nagios-external|nagios-just-a-test)/cgi-bin/>
  Options ExecCGI
  AuthType OpenID
  require valid-user
  AuthOpenIDSingleIdP https://id.fedoraproject.org/openid/
  AuthOpenIDSecureCookie on
  AuthOpenIDTrustRoot https://admin.fedoraproject.org
  AuthOpenIDServerName https://admin.fedoraproject.org
  # 3 hours
  AuthOpenIDCookieLifespan 10800
</Location>

<Directory "/usr/share/nagios/html">
  Options None
  AuthType OpenID
  AuthOpenIDSingleIdP https://id.fedoraproject.org/openid/
  AuthOpenIDSecureCookie on
  AuthOpenIDTrustRoot https://admin.fedoraproject.org
  AuthOpenIDServerName https://admin.fedoraproject.org
  # 3 hours
  AuthOpenIDCookieLifespan 10800
  Require valid-user granted
</Directory>

Alias /nagios /usr/share/nagios/html/

# This will only affect noc2 because the proxies only forward -external to it.
Alias /nagios-external /usr/share/nagios/html/

# Test
Alias /nagios-just-a-test /usr/share/nagios/html/
