5

I have been trying to setup nagios on mac and it definitely seems pretty easy but I am stuck at this point - I am unable to load the localhost/nagios/ page. I have the right configuration as far as I think.

I have installed PHP and changed the httpd.conf to include "index.php" with index.html. I do not think there is more to it but this small thing is not letting me proceed.

Could anyone shed some light and show me the way?

This is what I have in my configuration file for nagios in hhtpd.conf for apache:

# Nagios stuff

ScriptAlias /nagios/cgi-bin/ "/opt/local/sbin/nagios/"

< Directory "/opt/local/sbin/nagios">

AllowOverride None

Options ExecCGI
Order allow,deny
Allow from all
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /opt/local/etc/nagios/htpasswd.users
require valid-user

< /Directory>

Alias /nagios "/opt/local/share/nagios"

< Directory "/opt/local/share/nagios">

Options None
AllowOverride AuthConfig
Order allow,deny
Allow from all

< /Directory>

# End Nagios stuff

-- And the error_log file for apache has this:

[Fri Oct 19 11:02:09 2012] [error] [client ::1] Directory index forbidden by Options directive: /opt/local/share/nagios/

Nitin
  • 280
  • 1
  • 4
  • 12

2 Answers2

16

To resolve this problem:

  1. Simply install 'PHP' on your Nagios Server. yum install php.i686 if your OS is 32-bit or yum install php.x86_64 if your OS is 64-bit

  2. After the php installation restart your Apache/httpd server. service httpd restart

MikeBaz - MSFT
  • 2,938
  • 4
  • 28
  • 57
Rooter
  • 161
  • 4
1

you will have to change the nagios folder permission in your apache configuration. Look for nagios configuration file in apache (probably conf.d or extra folder).

Check here

Ankit
  • 3,083
  • 7
  • 35
  • 59
  • I just added what I have in my configuration file to my post and I am not sure how to change the permission from that? Any suggestions? Thanks! – Nitin Oct 19 '12 at 18:23
  • I could get to localhost/nagios by commenting the Options line - not sure what that means? But I am working on getting to this page now - http://localhost/nagios/cgi-bin/ For some reason, this would't show up even after I remove the Options line – Nitin Oct 19 '12 at 19:08
  • Have you created a user for nagios already? create one and use it for login on the nagios application. Also create a new group (unix user group i meant) and add both nagios user and apache user to this group. Use this same group while configuring nagios. – Ankit Oct 22 '12 at 05:54
  • I did those stuff and I could get to the /localhost/nagios page without a user (removed that part). But unable to go past that but anyway, I am bypassing this step to directly make nagios communicate with Graphite to send alert emails. – Nitin Oct 23 '12 at 01:41
  • Sorry, i have no idea about graphite. – Ankit Oct 30 '12 at 04:54