]> granicus.if.org Git - icinga2/commitdiff
Use Icinga 1.x Apache conf
authorTim Hardeck <thardeck@suse.de>
Tue, 2 Dec 2014 17:26:29 +0000 (18:26 +0100)
committerMichael Friedrich <michael.friedrich@netways.de>
Wed, 3 Dec 2014 16:03:04 +0000 (17:03 +0100)
This Apache conf is from Icinga 1.x and should work with Apache 2.2 and
2.4.

fixes #7929

etc/icinga/icinga-classic-apache.conf.cmake

index fce673f10ac9b281c2800cd7a21d6193762f1012..3df301cb2e17d3f9187edc0b3413d6b508a1c9e4 100644 (file)
@@ -11,20 +11,28 @@ ScriptAlias /icinga/cgi-bin "@CMAKE_INSTALL_FULL_LIBDIR@/icinga/cgi"
 #  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/"
@@ -33,19 +41,27 @@ 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>