This Apache conf is from Icinga 1.x and should work with Apache 2.2 and
2.4.
fixes #7929
# SSLRequireSSL
Options ExecCGI
AllowOverride None
- Order allow,deny
- <IfVersion < 2.3>
- Allow from all
-# Order deny,allow
-# Deny from all
-# Allow from 127.0.0.1
- </IfVersion>
- <IfVersion >= 2.3>
- Require all granted
- </IfVersion>
+
AuthName "Icinga Access"
AuthType Basic
AuthUserFile @CMAKE_INSTALL_FULL_SYSCONFDIR@/icinga/passwd
- Require valid-user
+
+ <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 "@CMAKE_INSTALL_FULL_DATADIR@/icinga/"
# SSLRequireSSL
Options None
AllowOverride All
- <IfVersion < 2.3>
- Order allow,deny
- Allow from all
-# Order deny,allow
-# Deny from all
-# Allow from 127.0.0.1
- </IfVersion>
- <IfVersion >= 2.3>
- Require all granted
- </IfVersion>
+
AuthName "Icinga Access"
AuthType Basic
AuthUserFile @CMAKE_INSTALL_FULL_SYSCONFDIR@/icinga/passwd
- Require valid-user
+
+ <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>