[packages/nagios] - migrated to apache 2.4

baggins baggins at pld-linux.org
Thu May 16 21:10:28 CEST 2013


commit ee3edbbec9bc0fd20a5ca5f4f768076e4e08c2c7
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Thu May 16 21:10:26 2013 +0200

    - migrated to apache 2.4

 nagios-apache.conf |  2 --
 nagios-httpd.conf  | 42 ++++++++++++++++++++++++++++++++++++++++++
 nagios.spec        | 11 +++++++----
 3 files changed, 49 insertions(+), 6 deletions(-)
---
diff --git a/nagios.spec b/nagios.spec
index 7d08524..862a2a4 100644
--- a/nagios.spec
+++ b/nagios.spec
@@ -12,7 +12,7 @@ Summary(pl.UTF-8):	Program do monitorowania serwerów/usług/sieci
 Summary(pt_BR.UTF-8):	Programa para monitoração de máquinas e serviços
 Name:		nagios
 Version:	3.5.0
-Release:	1
+Release:	2
 License:	GPL v2+
 Group:		Networking
 Source0:	http://downloads.sourceforge.net/nagios/nagios-3.x/%{name}-%{version}/%{name}-%{version}.tar.gz
@@ -29,6 +29,7 @@ Source7:	http://www.google.com/mapfiles/marker.png
 # Source7-md5:	edefef4bdfc29e1c953694651f05b466
 Source8:	googlemap.js
 Source9:	%{name}wall.php
+Source10:	%{name}-httpd.conf
 Patch0:		%{name}-resources.patch
 Patch1:		%{name}-iconv-in-libc.patch
 Patch2:		%{name}-webapps.patch
@@ -152,6 +153,7 @@ Requires:	webserver(cgi)
 Requires:	webserver(indexfile)
 Suggests:	%{name}-doc
 Suggests:	php-magpierss >= 0.72
+Conflicts:	apache-base < 2.4.0-1
 
 %description cgi
 CGI webinterface for Nagios.
@@ -261,6 +263,7 @@ sed -i -e '
 ' p1.pl
 
 sed -e 's,%{_prefix}/lib/,%{_libdir}/,' %{SOURCE1} > apache.conf
+sed -e 's,%{_prefix}/lib/,%{_libdir}/,' %{SOURCE10} > httpd.conf
 sed -e 's,%{_prefix}/lib/,%{_libdir}/,' %{SOURCE5} > lighttpd.conf
 
 # fixup cgi config
@@ -351,7 +354,7 @@ done
 
 # webserver files
 cp -p apache.conf $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/apache.conf
-cp -p apache.conf $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/httpd.conf
+cp -p httpd.conf $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/httpd.conf
 cp -p lighttpd.conf $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/lighttpd.conf
 cp -p sample-config/cgi.cfg $RPM_BUILD_ROOT%{_webapps}/%{_webapp}
 cp -p %{SOURCE6} $RPM_BUILD_ROOT%{htmldir}/images
@@ -439,11 +442,11 @@ fi
 %triggerun cgi -- apache1 < 1.3.37-3, apache1-base
 %webapp_unregister apache %{_webapp}
 
-%triggerin cgi -- apache < 2.2.0, apache-base
+%triggerin cgi -- apache-base
 %addusertogroup http nagcmd
 %webapp_register httpd %{_webapp}
 
-%triggerun cgi -- apache < 2.2.0, apache-base
+%triggerun cgi -- apache-base
 %webapp_unregister httpd %{_webapp}
 
 %triggerin cgi -- lighttpd
diff --git a/nagios-apache.conf b/nagios-apache.conf
index 57c2575..d79a87e 100644
--- a/nagios-apache.conf
+++ b/nagios-apache.conf
@@ -1,5 +1,3 @@
-# $Id$
-
 <Directory ~ "/usr/lib/nagios/cgi/|/usr/share/nagios/">
 	Options ExecCGI
 
diff --git a/nagios-httpd.conf b/nagios-httpd.conf
new file mode 100644
index 0000000..f7baaec
--- /dev/null
+++ b/nagios-httpd.conf
@@ -0,0 +1,42 @@
+<Directory ~ "/usr/lib/nagios/cgi/|/usr/share/nagios/">
+	Options ExecCGI
+
+	# WITHOUT SSL
+	<IfModule !mod_ssl.c>
+		Require all denied
+		Require local
+	</IfModule>
+
+	# WITH SSL ENABLED
+	<IfModule mod_ssl.c>
+		SSLRequireSSL
+
+		Require all granted
+		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=*)
+		</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>
+	Require all granted
+</Directory>
+<Directory /usr/share/doc/nagios>
+	Require all granted
+</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/ee3edbbec9bc0fd20a5ca5f4f768076e4e08c2c7



More information about the pld-cvs-commit mailing list