Forbidden page

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
khgv67
Posts: 8
Joined: Thu Jul 24, 2014 12:30 pm

Forbidden page

Post by khgv67 »

Hi,

I have installed nagios core properly by following the nagios installation guide.

But after clicking server_name/nagios I am getting below error.

Forbidden

You don't have permission to access /nagios/ on this server.
Apache/2.2.15 (Red Hat) Server at server_name Port 80

Although if I am clicking server_name/nagios it is asking for authentication. But even though I am giving the correct user name and password I am keep getting the above error. Please help me out of this.

Regards
Ashutosh
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Forbidden page

Post by sreinhardt »

What are the permissions on the /usr/local/nagios/sbin and /usr/local/nagios/share directories? Have you tried recreating the htpasswd file?

Code: Select all

ls -lart /usr/local/nagios/sbin
ls -lart /usr/local/nagios/share
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
khgv67
Posts: 8
Joined: Thu Jul 24, 2014 12:30 pm

Re: Forbidden page

Post by khgv67 »

Below is the permission of the folders you have asked for. Please help me out of this as I am badly stuck.
[root@servername nagios]# ls -lart share
total 100
drwxrwxrwx 2 nagios nagios 4096 Jul 25 08:19 media
drwxrwxrwx 3 nagios nagios 4096 Jul 25 08:19 docs
drwxrwxrwx 2 nagios nagios 4096 Jul 25 08:19 ssi
-rwxrwxrwx 1 nagios nagios 26 Jul 25 08:19 robots.txt
-rwxrwxrwx 1 nagios nagios 1176 Jul 25 08:19 jsonquery.html
-rwxrwxrwx 1 nagios nagios 1064 Jul 25 08:19 rss-corefeed.html
-rwxrwxrwx 1 nagios nagios 528 Jul 25 08:19 rss-newsfeed.html
-rwxrwxrwx 1 nagios nagios 552 Jul 25 08:19 config.inc.php
-rwxr-xr-x 1 nagios nagios 1608 Jul 25 08:19 index.php
-rwxrwxrwx 1 nagios nagios 8605 Jul 25 08:19 main.php
-rwxrwxrwx 1 nagios nagios 656 Jul 25 08:19 rss-corebanner.php
-rwxrwxrwx 1 nagios nagios 895 Jul 25 08:19 rss-corefeed.php
-rwxrwxrwx 1 nagios nagios 1064 Jul 25 08:19 rss-newsfeed.php
-rwxrwxrwx 1 nagios nagios 5756 Jul 25 08:19 side.php
drwxrwxrwx 2 nagios nagios 4096 Jul 25 08:19 stylesheets
drwxrwxrwx 2 nagios nagios 4096 Jul 25 08:19 contexthelp
drwxrwxrwx 2 nagios nagios 4096 Jul 25 08:19 js
drwxrwxrwx 3 nagios nagios 4096 Jul 25 08:19 includes
drwxrwxrwx 3 nagios nagios 4096 Jul 25 08:19 images
drwxr-xr-x 11 nagios nagios 4096 Jul 25 08:32 ..
drwxrwxrwx 11 nagios nagios 4096 Jul 25 08:32 .
drwxrwxrwx 4 root root 4096 Jul 25 08:32 locale

[root@server_name sbin]# ls -lrt
total 4956
-rwxrwxr-x 1 nagios nagios 306656 Jul 25 08:19 archivejson.cgi
-rwxrwxr-x 1 nagios nagios 292104 Jul 25 08:19 avail.cgi
-rwxrwxr-x 1 nagios nagios 287336 Jul 25 08:19 cmd.cgi
-rwxrwxr-x 1 nagios nagios 259272 Jul 25 08:19 config.cgi
-rwxrwxr-x 1 nagios nagios 300264 Jul 25 08:19 extinfo.cgi
-rwxrwxr-x 1 nagios nagios 255432 Jul 25 08:19 histogram.cgi
-rwxrwxr-x 1 nagios nagios 234728 Jul 25 08:19 history.cgi
-rwxrwxr-x 1 nagios nagios 230600 Jul 25 08:19 notifications.cgi
-rwxrwxr-x 1 nagios nagios 308448 Jul 25 08:19 objectjson.cgi
-rwxrwxr-x 1 nagios nagios 226472 Jul 25 08:19 outages.cgi
-rwxrwxr-x 1 nagios nagios 230856 Jul 25 08:19 showlog.cgi
-rwxrwxr-x 1 nagios nagios 300296 Jul 25 08:19 status.cgi
-rwxrwxr-x 1 nagios nagios 302784 Jul 25 08:19 statusjson.cgi
-rwxrwxr-x 1 nagios nagios 251016 Jul 25 08:19 statusmap.cgi
-rwxrwxr-x 1 nagios nagios 247048 Jul 25 08:19 statuswml.cgi
-rwxrwxr-x 1 nagios nagios 230664 Jul 25 08:19 statuswrl.cgi
-rwxrwxr-x 1 nagios nagios 255240 Jul 25 08:19 summary.cgi
-rwxrwxr-x 1 nagios nagios 242952 Jul 25 08:19 tac.cgi
-rwxrwxr-x 1 nagios nagios 263624 Jul 25 08:19 trends.cgi

Regards
Ashutosh
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Forbidden page

Post by sreinhardt »

Can you post your nagios.conf from /etc/httpd/conf.d/ please? Also is it repeatedly asking for the username and password, as though it thinks it is incorrect, or is it asking once accepting, then telling you that access is not allowed?
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
khgv67
Posts: 8
Joined: Thu Jul 24, 2014 12:30 pm

Re: Forbidden page

Post by khgv67 »

This issue is fixed. Problem was nagios.conf file only.
Locked