Nagios 403 error

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
LMW
Posts: 7
Joined: Mon May 09, 2011 2:04 am

Nagios 403 error

Post by LMW »

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?
tonyyarusso
Posts: 1128
Joined: Wed Mar 03, 2010 12:38 pm
Location: St. Paul, MN, USA
Contact:

Re: Nagios 403 error

Post by tonyyarusso »

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.
Tony Yarusso
Technical Services
___
TIES
Web: http://ties.k12.mn.us/
LMW
Posts: 7
Joined: Mon May 09, 2011 2:04 am

Re: Nagios 403 error

Post by LMW »

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.
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
Posts: 1128
Joined: Wed Mar 03, 2010 12:38 pm
Location: St. Paul, MN, USA
Contact:

Re: Nagios 403 error

Post by tonyyarusso »

Apparently squeeze's version of PHP should include FPM internally - could that change be affecting your setup?
Tony Yarusso
Technical Services
___
TIES
Web: http://ties.k12.mn.us/
LMW
Posts: 7
Joined: Mon May 09, 2011 2:04 am

Re: Nagios 403 error

Post by LMW »

tonyyarusso wrote:Apparently squeeze's version of PHP should include FPM internally - could that change be affecting your setup?
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
Posts: 1128
Joined: Wed Mar 03, 2010 12:38 pm
Location: St. Paul, MN, USA
Contact:

Re: Nagios 403 error

Post by tonyyarusso »

I've only done this with Apache, so I'm afraid I might not be much further help here.
Tony Yarusso
Technical Services
___
TIES
Web: http://ties.k12.mn.us/
LMW
Posts: 7
Joined: Mon May 09, 2011 2:04 am

Re: Nagios 403 error

Post by LMW »

tonyyarusso wrote:I've only done this with Apache, so I'm afraid I might not be much further help here.
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
Posts: 1128
Joined: Wed Mar 03, 2010 12:38 pm
Location: St. Paul, MN, USA
Contact:

Re: Nagios 403 error

Post by tonyyarusso »

As long as they're listening on different ports.
Tony Yarusso
Technical Services
___
TIES
Web: http://ties.k12.mn.us/
LMW
Posts: 7
Joined: Mon May 09, 2011 2:04 am

Re: Nagios 403 error

Post by LMW »

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:

Code: Select all

"auth_basic_user_file /etc/nagios3/conf.d/htpasswd;"


to:

Code: Select all

"auth_basic_user_file /etc/nagios3/htpasswd.users;"
"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?
LMW
Posts: 7
Joined: Mon May 09, 2011 2:04 am

Re: Nagios 403 error

Post by LMW »

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.
Locked