A little doc for configuring nginx for munin-cgi-graph and munin-cgi-html

You need to spawn the munin-cgi binaries manually, you can use spawn-fcgi with the following options:

        spawn-fcgi -s /var/run/munin/munin-cgi-html.sock -U www-data -u munin -g munin /usr/lib/cgi-bin/munin-cgi-html
        spawn-fcgi -s /var/run/munin/munin-cgi-graph.sock -U www-data -u munin -g munin /usr/lib/cgi-bin/munin-cgi-graph

In munin.conf set :

        graph_strategy cgi
        cgiurl_graph /cgi-bin/munin-cgi-graph
        html_strategy cgi

Nginx vhost example :

        location /munin/static {
                alias /var/cache/munin/www/static;
        }

        location /munin {
                alias /var/cache/munin/www;
        }

        location /munin-cgi/static {
                alias /etc/munin/static;
        }

        location ~ ^/cgi-bin/munin-cgi-graph/ {
                fastcgi_split_path_info ^(/cgi-bin/munin-cgi-graph)(.*);
                fastcgi_param PATH_INFO $fastcgi_path_info;
                fastcgi_pass unix:/var/run/munin/munin-cgi-graph.sock;
                include fastcgi_params;
        }

        location /munin-cgi/ {
                fastcgi_split_path_info ^(/munin-cgi)(.*);
                fastcgi_param PATH_INFO $fastcgi_path_info;
                fastcgi_pass unix:/var/run/munin/munin-cgi-html.sock;
                include fastcgi_params;
        }

Feel free to use it in Munin CgiHowto