Welcome! Log In Create A New Profile


Nagios served by NginX

December 30, 2010 11:23AM
Can some one please help me setting up Nagios on NginX. I installed spawn-fcgi and fcgiwrap in Ubuntu, and I have Nagios 3.2.3 installed in /opt/nagios. So I have the two folders: /opt/nagios/share for web files, and /opt/nagios/sbin for cgi scripts.

I tried with this config (with no success though):
location / {
root /opt/nagios/share;
index index.html;

rewrite ^/nagios/images/(.*)\.png /images/$1.png break;

auth_basic "Restricted";
auth_basic_user_file conf/htpasswd;

location ~ \.cgi$ {
root /opt/nagios/sbin;
rewrite ^/nagios/cgi-bin/(.*)\.cgi /$1.cgi break;

include /etc/nginx/fastcgi_params;

fastcgi_pass unix:/var/run/fcgiwrap.socket;
fastcgi_param SCRIPT_FILENAME /opt/nagios$fastcgi_script_name; # same path as above

auth_basic "Restricted";
auth_basic_user_file conf/htpasswd;

fastcgi_param AUTH_USER $remote_user;
fastcgi_param REMOTE_USER $remote_user;

This config is adaped from http://www.matejunkie.com/howto-let-nginx-serve-the-nagios-web-interface/

Does anyone use Nagios with NginX and can send me a working configuration?

Thank you in advance,

Subject Author Posted

Nagios served by NginX

nofun December 30, 2010 11:23AM

Re: Nagios served by NginX

iberkner December 30, 2010 11:36AM

Re: Nagios served by NginX

nofun December 30, 2010 12:05PM

Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 71
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready