Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Munin dynazoom graphs with nginx and spawn-fcgi
[Unit]
Description=Munin FCGI
After=network.target
[Service]
Type=forking
PIDFile=/var/run/munin/fcgi-graph.pid
Restart=always
ExecStartPre=/bin/mkdir -p /var/lib/munin/cgi-tmp/munin-cgi-graph
ExecStartPre=/bin/chown www-data:munin /var/lib/munin/cgi-tmp/munin-cgi-graph
ExecStart=/usr/bin/spawn-fcgi \
-s /var/run/munin/fcgi-graph.sock \
-P /var/run/munin/fcgi-graph.pid \
-U www-data -u www-data -g munin -M 0660 \
-- /usr/lib/munin/cgi/munin-cgi-graph
[Install]
WantedBy=multi-user.target
location ^~ /munin-cgi/munin-cgi-graph/ {
fastcgi_split_path_info ^(/munin-cgi/munin-cgi-graph)(.*)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_pass unix:/var/run/munin/fcgi-graph.sock;
include fastcgi_params;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment