INITIALLY SOLVED...
There is room for refinement... but that works quiet well!
location /graphs/ {
subs_filter_types text/html text/css text/xml;
subs_filter href="(../)* href="http://somedomain.example.com/graphs/ ir;
subs_filter src="/munin-cgi/munin-cgi-graph/somedomain.example.com/Servers/somedomain/ src="http://somedomain.example.com/graphs/;
proxy_buffering off;
rewrite /graphs/munin/static/(.*) /munin/static/$1 break;
rewrite /graphs/munin/(.*) /munin/somedomain.example.com/Servers/somedomain/$1 break;
rewrite /graphs/munin-cgi/(.*) /munin-cgi/munin-cgi-graph/somedomain.example.com/Servers/somedomain/$1 break;
rewrite /graphs/(.*).(png|jpg|gif) /graphs/munin-cgi/$1.$2 last;
rewrite /graphs/(.*)/(static)/(.*) /graphs/munin/static/$2 last;
rewrite /graphs/(.*) /graphs/munin/$1 last;
proxy_pass http://my-munin-server.example.com/;
proxy_redirect default;
}
There is room for refinement... but that works quiet well!
location /graphs/ {
subs_filter_types text/html text/css text/xml;
subs_filter href="(../)* href="http://somedomain.example.com/graphs/ ir;
subs_filter src="/munin-cgi/munin-cgi-graph/somedomain.example.com/Servers/somedomain/ src="http://somedomain.example.com/graphs/;
proxy_buffering off;
rewrite /graphs/munin/static/(.*) /munin/static/$1 break;
rewrite /graphs/munin/(.*) /munin/somedomain.example.com/Servers/somedomain/$1 break;
rewrite /graphs/munin-cgi/(.*) /munin-cgi/munin-cgi-graph/somedomain.example.com/Servers/somedomain/$1 break;
rewrite /graphs/(.*).(png|jpg|gif) /graphs/munin-cgi/$1.$2 last;
rewrite /graphs/(.*)/(static)/(.*) /graphs/munin/static/$2 last;
rewrite /graphs/(.*) /graphs/munin/$1 last;
proxy_pass http://my-munin-server.example.com/;
proxy_redirect default;
}