Today I switched from apache2 to nginx on my raspberry pi librenms setup.
And everything went on just fine, then I checked if smokeping was working from http://host.com/smokeping - and got 404. So I went down the rabbit hole of installing smokeping by following this official guide and that went on just fine as well until I met this little gem:
Add the following configuration to your /etc/nginx/conf.d/librenms.conf file within server section.
And I went to open librenms.conf in /etc/nginx/conf.d - there was nothing there? I had a look the official install guides as well, nothing about /etc/nginx/conf.d/librenms.conf there either.
Can someone paste the output of their /etc/nginx/conf.d/librenms.conf?
I need to paste this in the server section:
# Browsing to `http://yourlibrenms/smokeping/` should bring up the smokeping web interface
location = /smokeping/ {
fastcgi_intercept_errors on;
fastcgi_param SCRIPT_FILENAME /usr/lib/cgi-bin/smokeping.cgi;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
fastcgi_param HTTPS $https if_not_empty;
fastcgi_pass unix:/var/run/fcgiwrap.socket;
}
location ^~ /smokeping/ {
alias /usr/share/smokeping/www/;
index smokeping.cgi;
gzip off;
}
I tried to paste this info in the librenms.vhost-file and did not fly.