Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Re: Proxying a remote munin server

$
0
0
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;
}

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>