Nagios 403 error
Nagios 403 error
I have nagios + nginx running on Debian Lenny box. I've updated from nagios in Lenny repos to nagios in Squeeze repos. Everything was working before that. Now, when I try to access nagios on http://myserver/nagios3 I'm allowed to enter credentials, but after that I'm constantly getting "403 Forbidden" error.
nginx logs show: directory index of "/usr/share/nagios3/htdocs/" is forbidden, client: x.x.x.x, server: nagios3, request: "GET /nagios3/ HTTP/1.1", host: "x.x.x.x"
All permissions seem to be set OK. What could be a problem?
nginx logs show: directory index of "/usr/share/nagios3/htdocs/" is forbidden, client: x.x.x.x, server: nagios3, request: "GET /nagios3/ HTTP/1.1", host: "x.x.x.x"
All permissions seem to be set OK. What could be a problem?
-
- Posts: 1128
- Joined: Wed Mar 03, 2010 12:38 pm
- Location: St. Paul, MN, USA
- Contact:
Re: Nagios 403 error
Did you update nginx as well as nagios? It could be that it's not set to recognize index.php as a possible index file anymore.
Re: Nagios 403 error
Thank you for reply. No, I didn't update nginx (it's 0.8.54 now), because we've got a bunch of php-heavy web-sites and I didn't think that could be a case. I will do that later today. Any other suggestions?tonyyarusso wrote:Did you update nginx as well as nagios? It could be that it's not set to recognize index.php as a possible index file anymore.
-
- Posts: 1128
- Joined: Wed Mar 03, 2010 12:38 pm
- Location: St. Paul, MN, USA
- Contact:
Re: Nagios 403 error
Apparently squeeze's version of PHP should include FPM internally - could that change be affecting your setup?
Re: Nagios 403 error
Well, I don't know that for sure. My task is just to setup nagios for several servers while Nagios' server part have to be placed on that particular server. But I've updated PHP while updating Nagios to Squeeze version. So it's a new version now.tonyyarusso wrote:Apparently squeeze's version of PHP should include FPM internally - could that change be affecting your setup?
-
- Posts: 1128
- Joined: Wed Mar 03, 2010 12:38 pm
- Location: St. Paul, MN, USA
- Contact:
Re: Nagios 403 error
I've only done this with Apache, so I'm afraid I might not be much further help here.
Re: Nagios 403 error
I'm thinking of putting Nagios on Apache server. I don't think that will have any impact on nginx web-server and web-sites it's hosting. What do you think about that?tonyyarusso wrote:I've only done this with Apache, so I'm afraid I might not be much further help here.
-
- Posts: 1128
- Joined: Wed Mar 03, 2010 12:38 pm
- Location: St. Paul, MN, USA
- Contact:
Re: Nagios 403 error
As long as they're listening on different ports.
Re: Nagios 403 error
OK, a little update. I've been reading through Internet and found out, that "403 error" usually occurs when nginx can't properly read password file (that is possible when password in such file is not properly encrypted).
And one more strange thing. When I've changed the path to password file
from:
to:
"Login loop" started (of course I've created that new "htpasswd.users" file before that). I can't authorize at all! I've tried to generate password using Apache's htpasswd util, but with no success. Can anyone shed more light on that?
And one more strange thing. When I've changed the path to password file
from:
Code: Select all
"auth_basic_user_file /etc/nagios3/conf.d/htpasswd;"
to:
Code: Select all
"auth_basic_user_file /etc/nagios3/htpasswd.users;"
Re: Nagios 403 error
Thanks everybody for help. This issue was solved by moving "root" and "index" directives from "location" part to global. Now it's working as intended.