commit 9e1fada60d0446be02e560131f355ae2ccb6a764
Author: Elan Ruusamäe <[email protected]>
Date:   Fri Jan 31 00:33:40 2014 +0200

    multiapache version config

 nagios-apache.conf | 61 ++++++++++++++++++++++++++++++++++--------------------
 1 file changed, 38 insertions(+), 23 deletions(-)
---
diff --git a/nagios-apache.conf b/nagios-apache.conf
index 57c2575..dd354f9 100644
--- a/nagios-apache.conf
+++ b/nagios-apache.conf
@@ -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/
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/nagios.git/commitdiff/9e1fada60d0446be02e560131f355ae2ccb6a764

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to