Cannot access nagios/access forbidden

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
Phil7269
Posts: 24
Joined: Tue Oct 16, 2012 1:13 pm

Cannot access nagios/access forbidden

Post by Phil7269 »

Just installed a new installation of Nagios 3.2.3 on openSuSE 13.1 following the instructions here: http://nagios.sourceforge.net/docs/nagi ... nsuse.html

I followed the instructions word for word but when I try to access http://localhost/nagios I get the following error message:

Access forbidden!

You don't have permission to access the requested directory. There is either no index document or the directory is read-protected.

If you think this is a server error, please contact the webmaster.
Error 403
172.16.1.57
Apache/2.4.6 (Linux/SUSE)


Not quite sure what the permissions issue is. If I try to access http://localhost I get the same error, so not just an nagios issue. Would appreciate any help on how to set the permissions.

Thank you,

PT
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Cannot access nagios/access forbidden

Post by abrist »

Whats a tail of your apache log look like?

Code: Select all

tail -25  /var/log/apache2/error_log
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Phil7269
Posts: 24
Joined: Tue Oct 16, 2012 1:13 pm

Re: Cannot access nagios/access forbidden

Post by Phil7269 »

Code: Select all

[Mon Jan 27 12:46:34.137746 2014] [core:notice] [pid 1213] AH00094: Command line: '/usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D SYSTEMD -D FOREGROUND'
[Mon Jan 27 12:48:10.278937 2014] [autoindex:error] [pid 1291] [client 172.16.120.35:59080] AH01276: Cannot serve directory /usr/local/nagios/share/: No matching DirectoryIndex (index.html,index.html.var) found, and server-generated directory index forbidden by Options directive
[Mon Jan 27 12:48:16.259129 2014] [autoindex:error] [pid 1294] [client 127.0.0.1:40395] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var) found, and server-generated directory index forbidden by Options directive
[Mon Jan 27 12:51:27.895797 2014] [autoindex:error] [pid 1295] [client 172.16.120.35:59133] AH01276: Cannot serve directory /usr/local/nagios/share/: No matching DirectoryIndex (index.html,index.html.var) found, and server-generated directory index forbidden by Options directive
[Mon Jan 27 12:53:16.151120 2014] [autoindex:error] [pid 1293] [client 127.0.0.1:40439] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var) found, and server-generated directory index forbidden by Options directive
[Mon Jan 27 12:58:16.284333 2014] [autoindex:error] [pid 1296] [client 127.0.0.1:40441] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var) found, and server-generated directory index forbidden by Options directive
[Mon Jan 27 13:03:16.213790 2014] [autoindex:error] [pid 1805] [client 127.0.0.1:40443] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var) found, and server-generated directory index forbidden by Options directive
[Mon Jan 27 13:06:13.298470 2014] [autoindex:error] [pid 1294] [client 172.16.120.35:59186] AH01276: Cannot serve directory /usr/local/nagios/share/: No matching DirectoryIndex (index.html,index.html.var) found, and server-generated directory index forbidden by Options directive
[Mon Jan 27 13:06:16.847226 2014] [autoindex:error] [pid 1294] [client 172.16.120.35:59186] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var) found, and server-generated directory index forbidden by Options directive
[Mon Jan 27 13:08:16.110324 2014] [autoindex:error] [pid 1291] [client 127.0.0.1:40445] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var) found, and server-generated directory index forbidden by Options directive
[Mon Jan 27 13:13:16.230883 2014] [autoindex:error] [pid 1295] [client 127.0.0.1:40447] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var) found, and server-generated directory index forbidden by Options directive
[Mon Jan 27 13:18:16.098650 2014] [autoindex:error] [pid 1293] [client 127.0.0.1:40449] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var) found, and server-generated directory index forbidden by Options directive
[Mon Jan 27 13:23:16.237567 2014] [autoindex:error] [pid 1296] [client 127.0.0.1:40451] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var) found, and server-generated directory index forbidden by Options directive
[Mon Jan 27 13:28:16.112614 2014] [autoindex:error] [pid 1805] [client 127.0.0.1:40453] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var) found, and server-generated directory index forbidden by Options directive
[Mon Jan 27 13:33:16.235787 2014] [autoindex:error] [pid 1294] [client 127.0.0.1:40455] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var) found, and server-generated directory index forbidden by Options directive
[Mon Jan 27 13:38:16.111774 2014] [autoindex:error] [pid 1291] [client 127.0.0.1:40457] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var) found, and server-generated directory index forbidden by Options directive
[Mon Jan 27 13:43:16.218487 2014] [autoindex:error] [pid 1295] [client 127.0.0.1:40459] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var) found, and server-generated directory index forbidden by Options directive
[Mon Jan 27 13:48:16.104087 2014] [autoindex:error] [pid 1293] [client 127.0.0.1:40461] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var) found, and server-generated directory index forbidden by Options directive
[Mon Jan 27 13:53:16.238620 2014] [autoindex:error] [pid 1296] [client 127.0.0.1:40463] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var) found, and server-generated directory index forbidden by Options directive
[Mon Jan 27 13:58:16.122355 2014] [autoindex:error] [pid 1805] [client 127.0.0.1:40465] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var) found, and server-generated directory index forbidden by Options directive
[Mon Jan 27 14:03:16.250465 2014] [autoindex:error] [pid 1294] [client 127.0.0.1:40467] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var) found, and server-generated directory index forbidden by Options directive
[Mon Jan 27 14:08:16.127512 2014] [autoindex:error] [pid 1291] [client 127.0.0.1:40469] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var) found, and server-generated directory index forbidden by Options directive
[Mon Jan 27 14:13:16.252987 2014] [autoindex:error] [pid 1295] [client 127.0.0.1:40471] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var) found, and server-generated directory index forbidden by Options directive
[Mon Jan 27 14:13:44.840833 2014] [autoindex:error] [pid 1293] [client 172.16.120.35:27896] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var) found, and server-generated directory index forbidden by Options directive
[Mon Jan 27 14:13:49.998893 2014] [autoindex:error] [pid 1293] [client 172.16.120.35:27896] AH01276: Cannot serve directory /usr/local/nagios/share/: No matching DirectoryIndex (index.html,index.html.var) found, and server-generated directory index forbidden by Options directive
[1m[31mnagios:~ #(B[m
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Cannot access nagios/access forbidden

Post by abrist »

did you run:

Code: Select all

make install-webconf
and then restart apache2?

Code: Select all

service apache2 restart
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Phil7269
Posts: 24
Joined: Tue Oct 16, 2012 1:13 pm

Re: Cannot access nagios/access forbidden

Post by Phil7269 »

Yes. I followed the instructions word for word.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Cannot access nagios/access forbidden

Post by scottwilkerson »

Is php installed on this server?
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
frank.espasa
Posts: 1
Joined: Wed Jul 17, 2013 3:52 pm

Re: Cannot access nagios/access forbidden

Post by frank.espasa »

zypper install kernel-source make gcc gcc-c++
zypper install php
yast2 -i apache2-mod_php5

You need install PHP and PHP for APACHE2. I tested on openSuse 13.1 and work fine.

GL

Frank
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Cannot access nagios/access forbidden

Post by tmcdonald »

Thank you for the answer frank, but the original poster is long gone. I'll be closing this thread now.
Former Nagios employee
Locked