Nagios on cPanel, not parsing index.php

Hello,

I previously installed nagios 2.x some years ago on a plain RHEL 4. server… now i needed to setup this on a cPanel with CentOS 5.3…

I did all steps from the officiall guide: Fedora Quickstart

Everything seems to be fine, configuring, compiling and installing, started the service and it was ok, however, when I go to http://IP/nagios/ it shows a index.php, it is not parsing the php file.

This is what I got from httpd.conf:

[[email protected]:~]grep nagios /etc/httpd/conf/httpd.conf
# Include /etc/httpd/conf.d/nagios.conf
[[email protected]:~]cat /etc/httpd/conf.d/nagios.conf
# SAMPLE CONFIG SNIPPETS FOR APACHE WEB SERVER
# Last Modified: 11-26-2005
#
# This file contains examples of entries that need
# to be incorporated into your Apache web server
# configuration file.  Customize the paths, etc. as
# needed to fit your system.

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

<Directory "/usr/local/nagios/sbin">
#  SSLRequireSSL
   Options ExecCGI
   AllowOverride None
   Order allow,deny
   Allow from all
#  Order deny,allow
#  Deny from all
#  Allow from 127.0.0.1
   AuthName "Nagios Access"
   AuthType Basic
   AuthUserFile /usr/local/nagios/etc/htpasswd.users
   Require valid-user
</Directory>

Alias /nagios "/usr/local/nagios/share"

<Directory "/usr/local/nagios/share">
#  SSLRequireSSL
   Options None
   AllowOverride None
   Order allow,deny
   Allow from all
#  Order deny,allow
#  Deny from all
#  Allow from 127.0.0.1
   AuthName "Nagios Access"
   AuthType Basic
   AuthUserFile /usr/local/nagios/etc/htpasswd.users
   Require valid-user
</Directory>

[[email protected]:~]

Any ideas about what could be the issue?
Have anyone setup nagios 3.0 on a cPanel server?

Thanks!

This is some info about php and apache:

[code][[email protected]:~]grep handler /usr/local/apache/conf/httpd.conf -i
AddHandler cgi-script .cgi .pl .plx .ppl .perl
AddHandler server-parsed .shtml
SetHandler server-status

[[email protected]:~]php -v
PHP 5.2.10 (cli) (built: Sep 11 2009 17:28:49)
Copyright © 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright © 1998-2009 Zend Technologies
with eAccelerator v0.9.5.3, Copyright © 2004-2006 eAccelerator, by eAccelerator
with the ionCube PHP Loader v3.1.34, Copyright © 2002-2009, by ionCube Ltd., and
with Zend Extension Manager v1.2.2, Copyright © 2003-2007, by Zend Technologies
with Zend Optimizer v3.3.3, Copyright © 1998-2007, by Zend Technologies
[[email protected]:~]

[[email protected]:~]grep index.php /usr/local/apache/conf/httpd.conf
DirectoryIndex index.html.var index.htm index.html index.shtml index.xhtml index.wml index.perl index.pl index.plx index.ppl index.cgi index.jsp index.js index.jp index.php4 index.php3 index.php index.phtml default.htm default.html home.htm index.php5 Default.html Default.htm home.html[/code]

It’s a normal EasyApache compilation.

Thanks.

I’d say PHP isn’t installed correctly.

Hello Luca,

Thanks. it’s very weird… on all websites, php is parsing OK, except for anythign IP/*.php
Any ideas?

Thanks.

I don’t know cPanel, it could be it uses different instances of apache for each site you create and possibly the default apache (running on IP and not on a hostname) hasn’t php enabled…

parsing php is fixed, however nagios index still doesn’t parse at all

Any other ideas?