Aug 24

Smokeping on Nginx

Steps I took to configure smokeping on nginx (debian whezy):

1. install fcgiwrap

apt-get install fcgiwrap
cp /usr/share/doc/fcgiwrap/examples/nginx.conf /etc/nginx/fcgiwrap.conf

2. modify the host you want (or the default host) to suport cgi scripts

#fast cgi support
include /etc/nginx/fcgiwrap.conf;
location ~ \.cgi$
{
fastcgi_intercept_errors on;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass unix:/var/run/fcgiwrap.socket;
}

3.  create links from smokeping to your www folder:

ln -s /usr/share/smokeping/www  /var/www/smokeping
ln -s /usr/lib/cgi-bin/smokeping.cgi /usr/share/smokeping/www/smokeping.cgi

4. add the alias for smokeping:

location /smokeping/ {
index smokeping.cgi;
gzip off;
}