# SAMPLE CONFIG SNIPPETS FOR APACHE WEB SERVER
#
# This file contains examples of entries that need
# to be incorporated into your Apache web server
# configuration file.  Customize the paths, etc. as
# needed to fit your system.

ScriptAlias /cgi-bin/icinga "/var/www/cgi-bin/icinga"

<Directory "/var/www/cgi-bin/icinga">
#  SSLRequireSSL
   Options ExecCGI
   AllowOverride None

   AuthName "Icinga Access"
   AuthType Basic
   AuthUserFile /etc/icinga/htpasswd.users

   <IfModule mod_authz_core.c>
      # Apache 2.4
      <RequireAll>
         Require all granted
         # Require local
         Require valid-user
      </RequireAll>
   </IfModule>
   <IfModule !mod_authz_core.c>
      # Apache 2.2
      Order allow,deny
      Allow from all
      #  Order deny,allow
      #  Deny from all
      #  Allow from 127.0.0.1
      Require valid-user
    </IfModule>
 </Directory>

Alias /icinga "/var/www/icinga-cgi/"

<Directory "/var/www/icinga-cgi/">
#  SSLRequireSSL
   Options None
   AllowOverride All

   AuthName "Icinga Access"
   AuthType Basic
   AuthUserFile /etc/icinga/htpasswd.users

   <IfModule mod_authz_core.c>
      # Apache 2.4
      <RequireAll>
         Require all granted
         # Require local
         Require valid-user
      </RequireAll>
   </IfModule>
   <IfModule !mod_authz_core.c>
      # Apache 2.2
      Order allow,deny
      Allow from all
      #  Order deny,allow
      #  Deny from all
      #  Allow from 127.0.0.1
      Require valid-user
   </IfModule>
</Directory>
