Nagios 403 error

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

Nagios 403 error

Postby LMW » Tue May 10, 2011 4:56 pm

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?
LMW
 
Posts: 7
Joined: Mon May 09, 2011 2:04 am

Re: Nagios 403 error

Postby tonyyarusso » Wed May 11, 2011 9:21 am

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

Re: Nagios 403 error

Postby LMW » Wed May 11, 2011 10:06 am

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?
LMW
 
Posts: 7
Joined: Mon May 09, 2011 2:04 am

Re: Nagios 403 error

Postby tonyyarusso » Wed May 11, 2011 11:27 am

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

Re: Nagios 403 error

Postby LMW » Wed May 11, 2011 12:14 pm

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.
LMW
 
Posts: 7
Joined: Mon May 09, 2011 2:04 am

Re: Nagios 403 error

Postby tonyyarusso » Wed May 11, 2011 12:18 pm

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

Re: Nagios 403 error

Postby LMW » Wed May 11, 2011 1:08 pm

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?
LMW
 
Posts: 7
Joined: Mon May 09, 2011 2:04 am

Re: Nagios 403 error

Postby tonyyarusso » Wed May 11, 2011 4:14 pm

As long as they're listening on different ports.
Tony Yarusso
Technical Services
___
TIES
Web: http://ties.k12.mn.us/
tonyyarusso
 
Posts: 1128
Joined: Wed Mar 03, 2010 12:38 pm
Location: St. Paul, MN, USA

Re: Nagios 403 error

Postby LMW » Wed May 11, 2011 8:56 pm

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

Postby LMW » Thu May 12, 2011 11:07 am

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.
LMW
 
Posts: 7
Joined: Mon May 09, 2011 2:04 am


Return to Nagios Core

Who is online

Users browsing this forum: No registered users and 4 guests