1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
|
##
# Example configuration for munin using munin-cgi-html and
# munin-cgi-graph as FastCGI
#
# Put this file in /etc/nginx/sites-available and link it in
# /etc/nginx/sites-enabled
#
# In addition, the Munin log files and html area should be writable
# to the web server.
#
# Based on http://munin-monitoring.org/wiki/CgiHowto2#nginx
##
server {
listen 127.0.0.1;
root /var/cache/munin;
access_log /var/log/nginx/munin-access.log;
error_log /var/log/nginx/munin-errors.log;
# Make site accessible from http://localhost/
server_name localhost;
location / {
deny all;
}
location /munin/static/ {
alias /etc/munin/static/;
expires 31d;
}
location /munin/ {
fastcgi_split_path_info ^(/munin)(.*);
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_pass unix:/run/munin/fcgi-html.sock;
include fastcgi_params;
}
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:/run/munin/fcgi-graph.sock;
include fastcgi_params;
}
}
|