apt-get install munin
apt-get install spawn-fcgi
spawn-fcgi -s /var/run/munin/fcgi-graph.sock -U www-data -u munin -g munin /usr/lib/munin/cgi/munin-cgi-graph
server {
listen 80;
server_name munin.dynaccount.com;
root /var/cache/munin/www;
location / {
try_files $uri $uri/ =404;
}
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;
}
}
当我点击图表时,会返回浏览器中的以下错误
502 Bad gateway
http://munin.domain/munin-cgi/munin-cgi-graph/localdomain/localhost.localdomain/exim_mailqueue-pinpoint=1492758910,1492866910.png?&lower_limit=&upper_limit=&size_x=800&size_y=400
答案 0 :(得分:1)
我的ubuntu服务器上遇到了同样的问题。我试过这个https://serverfault.com/a/713408但没有任何反应,然后我删除了
/var/run/munin/fcgi-graph.sock
然后再跑:
spawn-fcgi -s /var/run/munin/fcgi-graph.sock -U www-data -u www-data -g www-data /usr/lib/munin/cgi/munin-cgi-graph
之后一切正常。