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):
[code]
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;
}
[/code]
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,
Vlad.
http://VladGh.com