0

I have a VPS serving a website using nginx and jetty and everything works fine. The website is accesible through my .com domain.

I have installed monitorix and I want to access monitorix web user interface which should be served as well by nginx (I don't want to install another server like lighttpd or apache just for monitorix). In the monitorix documentation it says that it should be accessible through http://localhost/monitorix. I have tried www.mydomain.com/monitorix but it shows my custom 404 page, and I have also tried to access http://localhost/monitorix with both curl and lynx and I get the 404 page as well.

How can I configure nginx to serve monitorix WUI? It is ok if I configure it to serve it only to localhost and I can create an SSH tunnel from my computer to see the page and graphic statics.

Thank you!!

1
  • do you have a location and an alias in your nginx configuration for monitorix? what does the nginx access.log and error.log say when you try to access it? Apr 24, 2014 at 14:49

2 Answers 2

1

Nginx don't support CGI. You can try SimpleCGI, but i recommend install Apache for Monitorix.

3
1

You can use fcgiwrap to access the Monitorix cgi script from NGINX.

    location /monitorix {
        alias /var/lib/monitorix/www/;
    }

    location /monitorix-cgi/ {
        alias /var/lib/monitorix/www/cgi/;
        include fastcgi_params;
        fastcgi_pass unix:/run/fcgiwrap.socket;
        fastcgi_param SCRIPT_FILENAME $request_filename;
    }

As documented in the FAQ the web server needs write permissions in the imgs directory:

chown -R www-data:www-data /var/lib/monitorix/www/imgs

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .