# Trouble with Installing Nagios



## atwinix (Mar 15, 2010)

Hello everyone!

I am trying to install Nagios but for some reason I can't get it to work!  I followed the guide available at http://www.wonkity.com/~wblock/docs/nagios.pdf.

I have modified the guide and updated the paths as required (such as for apache and the nagios cgi-bin paths).

But I still can't get it to work.  My configuration is fine (no errors when I launch nagios).  But for some reason I can't access the web interface - 403 forbidden error.

Can anyone help?  I am trying to set Nagios and SNMP for a project.

Thanking you all for your help,


atwinix


----------



## gordon@ (Mar 16, 2010)

What does your Apache error log say?


----------



## SirDice (Mar 16, 2010)

Most likely cause? Directory browsing is disabled and DirectoryIndex isn't set correctly.


----------



## atwinix (Mar 17, 2010)

This is basically what the error log contains:

```
[Mon Mar 15 23:51:21 2010] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Mon Mar 15 23:51:22 2010] [notice] Digest: generating secret for digest authentication ...
[Mon Mar 15 23:51:22 2010] [notice] Digest: done
[Mon Mar 15 23:51:23 2010] [notice] Apache/2.2.13 (FreeBSD) mod_ssl/2.2.13 OpenSSL/0.9.8k DAV/2 PHP/5.2.12 with Suhosin-Patch configured -- 
resuming normal operations
[Mon Mar 15 23:51:28 2010] [error] [client 192.168.2.2] File does not exist: /usr/local/www/apache22/data/nagios
[Mon Mar 15 23:51:33 2010] [error] [client 192.168.2.2] File does not exist: /usr/local/www/apache22/data/nagios
[Tue Mar 16 00:18:38 2010] [error] [client 192.168.2.2] File does not exist: /usr/local/www/apache22/data/nagios
[Tue Mar 16 00:36:13 2010] [error] [client 192.168.2.2] File does not exist: /usr/local/www/apache22/data/nagios
[Tue Mar 16 00:36:13 2010] [error] [client 192.168.2.2] File does not exist: /usr/local/www/apache22/data/nagios
[Tue Mar 16 00:36:16 2010] [error] [client 192.168.2.2] File does not exist: /usr/local/www/apache22/data/nagios
[Tue Mar 16 00:36:22 2010] [notice] SIGHUP received.  Attempting to restart
[Tue Mar 16 00:36:23 2010] [warn] (2)No such file or directory: Failed to enable the 'httpready' Accept Filter
[Tue Mar 16 00:36:23 2010] [notice] Digest: generating secret for digest authentication ...
[Tue Mar 16 00:36:23 2010] [notice] Digest: done
[Tue Mar 16 00:36:24 2010] [notice] Apache/2.2.13 (FreeBSD) mod_ssl/2.2.13 OpenSSL/0.9.8k DAV/2 PHP/5.2.12 with Suhosin-Patch configured -- 
resuming normal operations
[Tue Mar 16 00:36:29 2010] [error] [client 192.168.2.2] Directory index forbidden by Options directive: /usr/local/www/nagios/
[Tue Mar 16 00:36:30 2010] [error] [client 192.168.2.2] Directory index forbidden by Options directive: /usr/local/www/nagios/
[Tue Mar 16 00:36:42 2010] [error] [client 192.168.2.2] Directory index forbidden by Options directive: /usr/local/www/nagios/
[Tue Mar 16 00:38:05 2010] [error] [client 192.168.2.2] Directory index forbidden by Options directive: /usr/local/www/nagios/
[Tue Mar 16 00:38:06 2010] [error] [client 192.168.2.2] Directory index forbidden by Options directive: /usr/local/www/nagios/
[Tue Mar 16 00:38:06 2010] [error] [client 192.168.2.2] Directory index forbidden by Options directive: /usr/local/www/nagios/
[Tue Mar 16 00:38:07 2010] [error] [client 192.168.2.2] Directory index forbidden by Options directive: /usr/local/www/nagios/
[Tue Mar 16 00:38:07 2010] [error] [client 192.168.2.2] Directory index forbidden by Options directive: /usr/local/www/nagios/
[Tue Mar 16 00:38:07 2010] [error] [client 192.168.2.2] Directory index forbidden by Options directive: /usr/local/www/nagios/
[Tue Mar 16 00:38:07 2010] [error] [client 192.168.2.2] Directory index forbidden by Options directive: /usr/local/www/nagios/
[Tue Mar 16 00:56:44 2010] [error] [client 192.168.2.2] Directory index forbidden by Options directive: /usr/local/www/nagios/
[Tue Mar 16 00:57:04 2010] [error] [client 192.168.2.2] Directory index forbidden by Options directive: /usr/local/www/nagios/
[Tue Mar 16 00:57:04 2010] [error] [client 192.168.2.2] Directory index forbidden by Options directive: /usr/local/www/nagios/
[Tue Mar 16 01:01:14 2010] [error] [client 192.168.2.2] Directory index forbidden by Options directive: /usr/local/www/nagios/
[Tue Mar 16 01:01:15 2010] [error] [client 192.168.2.2] Directory index forbidden by Options directive: /usr/local/www/nagios/
[Tue Mar 16 01:01:15 2010] [error] [client 192.168.2.2] Directory index forbidden by Options directive: /usr/local/www/nagios/
[Tue Mar 16 01:01:15 2010] [error] [client 192.168.2.2] Directory index forbidden by Options directive: /usr/local/www/nagios/
[Tue Mar 16 01:01:15 2010] [error] [client 192.168.2.2] Directory index forbidden by Options directive: /usr/local/www/nagios/
[Tue Mar 16 01:01:15 2010] [error] [client 192.168.2.2] Directory index forbidden by Options directive: /usr/local/www/nagios/
[Tue Mar 16 01:01:59 2010] [error] [client 192.168.2.2] File does not exist: /usr/local/www/apache22/data/favicon.ico, referer: [url]http://192.168.2.4/[/url]
[Tue Mar 16 01:02:02 2010] [error] [client 192.168.2.2] Directory index forbidden by Options directive: /usr/local/www/nagios/
[Tue Mar 16 01:03:32 2010] [error] [client 192.168.2.2] Directory index forbidden by Options directive: /usr/local/www/nagios/
[Tue Mar 16 01:03:33 2010] [error] [client 192.168.2.2] Directory index forbidden by Options directive: /usr/local/www/nagios/
[Tue Mar 16 01:03:33 2010] [error] [client 192.168.2.2] Directory index forbidden by Options directive: /usr/local/www/nagios/
[Tue Mar 16 01:03:34 2010] [error] [client 192.168.2.2] Directory index forbidden by Options directive: /usr/local/www/nagios/
[Tue Mar 16 01:03:40 2010] [error] [client 192.168.2.2] Directory index forbidden by Options directive: /usr/local/www/nagios/
[Tue Mar 16 01:06:45 2010] [error] [client 192.168.2.2] Directory index forbidden by Options directive: /usr/local/www/nagios/
```
I have checked the nagios directory and verified the .htaccess permissions.  They look fine to me.


----------



## atwinix (Mar 17, 2010)

I just got these new errors while trying to fix it:

```
[Wed Mar 17 16:18:28 2010] [notice] Apache/2.2.13 (FreeBSD) mod_ssl/2.2.13 OpenSSL/0.9.8k DAV/2 PHP/5.2.12 with Suhosin-Patch configured -- 
resuming normal operations
[Wed Mar 17 16:18:46 2010] [error] [client 192.168.2.2] client denied by server configuration: /usr/local/www/nagios/
[Wed Mar 17 16:18:46 2010] [error] [client 192.168.2.2] client denied by server configuration: /usr/local/www/nagios/
[Wed Mar 17 16:18:47 2010] [error] [client 192.168.2.2] client denied by server configuration: /usr/local/www/nagios/
[Wed Mar 17 16:18:48 2010] [error] [client 192.168.2.2] client denied by server configuration: /usr/local/www/nagios/
[Wed Mar 17 16:18:48 2010] [error] [client 192.168.2.2] client denied by server configuration: /usr/local/www/nagios/
[Wed Mar 17 16:18:48 2010] [error] [client 192.168.2.2] client denied by server configuration: /usr/local/www/nagios/
```


----------



## SirDice (Mar 17, 2010)

Set the proper DirectoryIndex.


----------

