Package: check-mk-server Version: 1.2.2p3-1 Severity: minor Tags: patch Hi,
On Ubuntu, the default Apache setup doesn't include mod_version so the trick used to handle Apache 2.2 and 2.4 doesn't work out of the box. Using a IfModule directive as done in the patch does work though. In the attached patch, the "allow from all" is translated to "Require all granted" instead of "Require local" (equivalent of localhost connection). The section to gracefully degrade when mod_python isn't available was also updated to handle both Apache versions. Best regards, Simon
commit bc29299b4e0eb73c8681011eb1489171d53bf148 Author: Simon Deziel <[email protected]> Date: Wed Mar 19 17:34:40 2014 -0400 Improve handling of Apache 2.2 and 2.4 * Use IfModule instead of IfVersion * Properly translate "allow from all" -> "Require all granted" * Translate "Deny from all" -> "Require all denied" diff --git a/apache.icinga b/apache.icinga index 459b898..0335b25 100644 --- a/apache.icinga +++ b/apache.icinga @@ -18,13 +18,13 @@ DirectoryIndex index.py #Handle apache 2.2 and 2.4 - <IfVersion >= 2.3> - Require local - </IfVersion> - <IfVersion < 2.3> + <IfModule mod_authz_core.c> + Require all granted + </IfModule> + <IfModule !mod_authz_core.c> Order deny,allow allow from all - </IfVersion> + </IfModule> # Need Nagios authentification. Please edit the # following: Set AuthName and AuthUserFile to the # same value that you use for your Nagios configuration! @@ -41,7 +41,12 @@ <IfModule !mod_python.c> Alias /check_mk /usr/share/check_mk/web/htdocs <Directory /usr/share/check_mk/web/htdocs> - Deny from all + <IfModule mod_authz_core.c> + Require all denied + </IfModule> + <IfModule !mod_authz_core.c> + Deny from all + </IfModule> ErrorDocument 403 "<h1>Check_mk: Incomplete Apache2 Installation</h1>You need mod_python in order to run the web interface of check_mk.<br> Please install mod_python and restart Apache." </Directory> </IfModule> diff --git a/apache.nagios3 b/apache.nagios3 index a3b4603..2ac82c7 100644 --- a/apache.nagios3 +++ b/apache.nagios3 @@ -18,13 +18,13 @@ DirectoryIndex index.py #Handle apache 2.2 and 2.4 - <IfVersion >= 2.3> - Require local - </IfVersion> - <IfVersion < 2.3> + <IfModule mod_authz_core.c> + Require all granted + </IfModule> + <IfModule !mod_authz_core.c> Order deny,allow allow from all - </IfVersion> + </IfModule> # Need Nagios authentification. Please edit the # following: Set AuthName and AuthUserFile to the # same value that you use for your Nagios configuration! @@ -41,7 +41,12 @@ <IfModule !mod_python.c> Alias /check_mk /usr/share/check_mk/web/htdocs <Directory /usr/share/check_mk/web/htdocs> - Deny from all + <IfModule mod_authz_core.c> + Require all denied + </IfModule> + <IfModule !mod_authz_core.c> + Deny from all + </IfModule> ErrorDocument 403 "<h1>Check_mk: Incomplete Apache2 Installation</h1>You need mod_python in order to run the web interface of check_mk.<br> Please install mod_python and restart Apache." </Directory> </IfModule>

