]> git.pld-linux.org Git - packages/nagios.git/commitdiff
multiapache version config
authorElan Ruusamäe <glen@delfi.ee>
Thu, 30 Jan 2014 22:33:40 +0000 (00:33 +0200)
committerElan Ruusamäe <glen@delfi.ee>
Thu, 30 Jan 2014 22:33:40 +0000 (00:33 +0200)
nagios-apache.conf

index 57c2575d8b198f7fefe862b0ec849fbed08def1b..dd354f9dd15f7e6562829fbb0eb46cab8c0e0aef 100644 (file)
@@ -1,45 +1,60 @@
-# $Id$
+ScriptAlias /nagios/cgi-bin/ /usr/lib/nagios/cgi/
+Alias /nagios/ /usr/share/nagios/
+Alias /nagios/docs/ /usr/share/doc/nagios/
+
+# We grant access to static images for everybody, as the files are available
+# publically anyway, but without having it with http password i'm able to link
+# icons to jabber notify messages :)
+<Directory ~ "^/usr/share/(doc/nagios|nagios/images)">
+       # Apache 2.x
+       <IfModule !mod_authz_core.c>
+               Order allow,deny
+               Allow from all
+       </IfModule>
+       # Apache 2.4
+       <IfModule mod_authz_core.c>
+               Require all granted
+       </IfModule>
+</Directory>
 
 <Directory ~ "/usr/lib/nagios/cgi/|/usr/share/nagios/">
        Options ExecCGI
 
        # WITHOUT SSL
        <IfModule !mod_ssl.c>
-               Order deny,allow
-               Deny from all
-               Allow from 127.0.0.1
+               # Apache 2.x
+               <IfModule !mod_authz_core.c>
+                       Order deny,allow
+                       Deny from all
+                       Allow from 127.0.0.1
+               </IfModule>
+               # Apache 2.4
+               <IfModule mod_authz_core.c>
+                       Require all denied
+                       Require local
+               </IfModule>
        </IfModule>
 
        # WITH SSL ENABLED
        <IfModule mod_ssl.c>
                SSLRequireSSL
 
-               Allow from all
                AuthType Basic
                AuthName "Nagios"
 
-               # LDAP based Authz. Apache 1.3
-               <IfModule mod_auth_ldap.c>
-                       AuthLDAPEnabled on
-                       AuthLDAPURL ldap://ldap.example.org/ou=People,dc=example,dc=org?uid?sub?(objectClass=*)
+               # Apache 2.x
+               <IfModule !mod_authz_core.c>
+                       Allow from all
                </IfModule>
 
+               # LDAP based Authz. Apache 1.3
+#              <IfModule mod_auth_ldap.c>
+#                      AuthLDAPEnabled on
+#                      AuthLDAPURL ldap://ldap.example.org/ou=People,dc=example,dc=org?uid?sub?(objectClass=*)
+#              </IfModule>
+
                AuthUserFile /etc/webapps/nagios/passwd
                AuthGroupFile /etc/webapps/nagios/group
                Require group nagios
        </IfModule>
 </Directory>
-
-# We grant access to static images for everybody, as the files are available
-# publically anyway, but without having it with http password i'm able to link
-# icons to jabber notify messages :)
-<Directory /usr/share/nagios/images>
-       Allow from all
-</Directory>
-<Directory /usr/share/doc/nagios>
-       Allow from all
-</Directory>
-
-ScriptAlias /nagios/cgi-bin/ /usr/lib/nagios/cgi/
-Alias /nagios/docs/ /usr/share/doc/nagios/
-Alias /nagios/ /usr/share/nagios/
This page took 0.158332 seconds and 4 git commands to generate.