[munin] Added CGI workarounds

fenris02 fenris02 at fedoraproject.org
Sat Dec 8 17:25:42 UTC 2012


commit 6ec3cb53776ed68cfc1442d4fe246e24e3355229
Author: D. Johnson <fenris02 at fedoraproject.org>
Date:   Sat Dec 8 11:25:21 2012 -0600

    Added CGI workarounds

 httpd_munin-cgi.conf |    5 ++++-
 munin.spec           |    9 ++++-----
 2 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/httpd_munin-cgi.conf b/httpd_munin-cgi.conf
index c103454..3f74e0c 100644
--- a/httpd_munin-cgi.conf
+++ b/httpd_munin-cgi.conf
@@ -16,6 +16,10 @@
     RewriteRule ^/favicon.ico /var/www/html/munin/static/favicon.ico [L]
     RewriteRule ^/static/(.*) /var/www/html/munin/static/$1          [L]
 
+    # workaround for some static content
+    RewriteRule /favicon.ico /var/www/html/munin/static/favicon.ico            [L]
+    RewriteRule /static/style-new.css /var/www/html/munin/static/style-new.css [L]
+
     # HTML
     RewriteCond %{REQUEST_URI} .html$ [or]
     RewriteCond %{REQUEST_URI} =/
@@ -25,7 +29,6 @@
     # - remove path to munin-cgi-graph, if present
     RewriteRule ^/munin-cgi/munin-cgi-graph/(.*) /$1
 
-    RewriteCond %{REQUEST_URI} !^/static
     RewriteCond %{REQUEST_URI} .png$
     RewriteRule ^/(.*) /var/www/cgi-bin/munin-cgi-graph/$1 [L]
 
diff --git a/munin.spec b/munin.spec
index e92beae..fe6466f 100644
--- a/munin.spec
+++ b/munin.spec
@@ -232,8 +232,7 @@ http://munin.readthedocs.org/en/latest/example/webserver/apache-virtualhost.html
 QUICK-HOWTO:
 sed -i 's/\(.*\)_strategy.*/\1_strategy cgi/' /etc/munin/munin.conf
 htpasswd -bc /etc/munin/munin-htpasswd MUNIN_WEB_USER PASSWORD
-cp --backup /etc/sysconfig/spawn-fcgi-munin /etc/sysconfig/spawn-fcgi
-for svc in httpd munin-node spawn-fcgi; do
+for svc in httpd munin-node ; do
   service $svc stop
   chkconfig $svc on
   service $svc start
@@ -422,13 +421,13 @@ sed -i 's/^\[.*/\[localhost\]/' %{buildroot}/etc/munin/munin.conf
 # Create sample fcgi config files
 mkdir -p %{buildroot}/etc/sysconfig %{buildroot}/etc/httpd/conf.d
 cp %{SOURCE19} %{buildroot}/etc/httpd/conf.d/munin-cgi.conf
-cat > %{buildroot}/etc/sysconfig/spawn-fcgi-munin <<EOT
+cat > %{buildroot}/etc/sysconfig/spawn-fcgi-munin <<EOT.spawn
 # SAMPLE: Rename this file to /etc/sysconfig/spawn-fcgi and edit to fit
-# (Without something like this, munin-cgi will not work properly via init script)
+# (Without this, nginx + munin-cgi will not work properly via init script)
 SOCKET=/var/run/mod_fcgid/fcgi-graph.sock
 OPTIONS="-U apache -u apache -g apache -s $SOCKET -S -M 0600 -C 32 -F 1 -P /var/run/spawn-fcgi.pid -- /var/www/cgi-bin/munin-cgi-graph"
 
-EOT
+EOT.spawn
 
 # Create sample htpasswd file
 touch %{buildroot}/etc/munin/munin-htpasswd


More information about the scm-commits mailing list