Hi all,
I've tried many 'solutions' I've found on the internet to get this right, but so far nothing has worked properly. With my current setup I can see the Nagios home page, but get 'Access denied' when trying to view any of the charts etc.
I don't believe there's anything wrong with folder / file permissions since it was working fine under Apache.
Here's part of my .conf file for the site, can anyone see what the problem might be?
root /usr/local/nagios/share;
index index.php index.html;
auth_basic "Authentication required";
auth_basic_user_file /usr/local/nagios/etc/htpasswd.users;
location /stylesheets {
alias /usr/local/nagios/share/stylesheets;
}
location ~ \.php$ {
include /etc/nginx/fastcgi_params;
fastcgi_param SCRIPT_FILENAME /usr/local/nagios/share$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_script_name;
fastcgi_pass 127.0.0.1:9000;
fastcgi_intercept_errors on;
}
location ~ ^/nagios/cgi-bin/ {
root /usr/local/nagios/sbin/;
rewrite ^/nagios/cgi-bin/(.*)\.cgi /$1.cgi break;
include /etc/nginx/fastcgi_params;
fastcgi_param AUTH_USER $remote_user;
fastcgi_param REMOTE_USER $remote_user;
fastcgi_param SCRIPT_FILENAME /usr/local/nagios/sbin$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_script_name;
fastcgi_pass 127.0.0.1:9000;
}
}