Code

Multisite works with either Icinga or Nagios3
[pkg-check_mk.git] / debian / apache.icinga
diff --git a/debian/apache.icinga b/debian/apache.icinga
new file mode 100644 (file)
index 0000000..c41d687
--- /dev/null
@@ -0,0 +1,41 @@
+# Created by setup of check_mk version 1.1.6p1
+# This file will *not* be overwritten at the next setup
+# of check_mk. You may edit it as needed. In order to get
+# a new version, please delete it and re-run setup.sh.
+
+# Note for RedHat 5.3 users (and probably other version:
+# this file must be loaded *after* python.conf, otherwise
+# <IfModule mod_python.c> does not trigger! For that
+# reason, it is installed as zzz_.... Sorry for the
+# inconveniance.
+
+<IfModule mod_python.c>
+    Alias /check_mk /usr/share/check_mk/web/htdocs
+    <Directory /usr/share/check_mk/web/htdocs>
+        AddHandler mod_python .py
+        PythonHandler index
+        PythonDebug On 
+        DirectoryIndex index.py
+
+        # Need Nagios authentification. Please edit the
+        # following: Set AuthName and AuthUserFile to the
+        # same value that you use for your Nagios configuration!
+        Order deny,allow
+        allow from all
+        AuthName "Icinga Access"
+        AuthType Basic
+        AuthUserFile /etc/icinga/htpasswd.users
+        require valid-user
+
+        ErrorDocument 403 "<h1>Authentication Problem</h1>Either you've entered an invalid password or the authentication<br>configuration of your check_mk web pages is incorrect.<br><br>Please make sure that you've edited the file<br><tt>/etc/apache2/conf.d/check_mk</tt> and made it use the same<br>authentication settings as your Nagios web pages.<br>Restart Apache afterwards."
+        ErrorDocument 500 "<h1>Server or Configuration Problem</h1>A Server problem occurred. You'll find details in the error log of Apache. One possible reason is, that the file <tt>/etc/nagios/htpasswd.users</tt> is missing. You can create that file with <tt>htpasswd</tt> or <tt>htpasswd2</tt>. A better solution might be to use your existing htpasswd file from your Nagios installation. Please edit <tt>/etc/apache2/conf.d/check_mk</tt> and change the path there. Restart Apache afterwards."
+      </Directory>
+</IfModule>
+
+<IfModule !mod_python.c>
+    Alias /check_mk /usr/share/check_mk/web/htdocs
+    <Directory /usr/share/check_mk/web/htdocs>
+        Deny from all
+        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>