2017-04-22 46 views
1

安裝

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 

nginx的

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

當我點擊瀏覽器中的以下錯誤返回nginx的穆寧產卵FastCGI的曲線圖

502網關

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

我已經有相同的問題在我的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 

,一切工作正常後。