Page 1 of 1
Nagios Core with NGINX
Posted: Thu Nov 22, 2018 3:24 am
by fritnes
hello,
I tried to install Nagios on Nginx. I used
https://gist.github.com/vietdien2005/87 ... 3a9c24d6d7. After installation, new map, trends and histogram do not work.
"Warning: Monitoring process may not be running!"
Can someone tell me what's wrong?
Re: Nagios Core with NGINX
Posted: Mon Nov 26, 2018 5:21 pm
by ssax
Please try changing this section of your
/etc/nginx/conf.d/nagios.conf:
Code: Select all
location ~ .cgi$ {
root /usr/local/nagios/sbin/;
include fastcgi_params;
rewrite ^/nagios/cgi-bin/(.*).cgi /$1.cgi break;
fastcgi_param AUTH_USER $remote_user;
fastcgi_param REMOTE_USER $remote_user;
fastcgi_pass unix:/var/run/fcgiwrap.socket;
fastcgi_param SCRIPT_FILENAME /usr/local/nagios/sbin/$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_script_name;
}
To this:
Code: Select all
location ~ .cgi$ {
root /usr/local/nagios/sbin/;
include fastcgi_params;
rewrite ^/cgi-bin/(.*).cgi /$1.cgi break;
fastcgi_param AUTH_USER $remote_user;
fastcgi_param REMOTE_USER $remote_user;
fastcgi_pass unix:/var/run/fcgiwrap.socket;
fastcgi_param SCRIPT_FILENAME /usr/local/nagios/sbin/$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_script_name;
}
Then restart nginx and try it again:
Let us know the results.