The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Nagios on cPanel, not parsing index.php

Discussion in 'Workarounds and Optimization' started by sh4ka, Nov 16, 2009.

  1. sh4ka

    sh4ka Well-Known Member

    Joined:
    May 12, 2005
    Messages:
    442
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    US
    cPanel Access Level:
    DataCenter Provider
    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:

    Code:
    [root@my.server.com:~]grep nagios /etc/httpd/conf/httpd.conf
    # Include /etc/httpd/conf.d/nagios.conf
    [root@my.server.com:~]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>
    
    [root@my.server.com:~]
    
    Any ideas about what could be the issue?
    Have anyone setup nagios 3.0 on a cPanel server?

    Thanks!
     
  2. eth00

    eth00 Well-Known Member
    PartnerNOC

    Joined:
    Mar 30, 2003
    Messages:
    723
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    NC
    cPanel Access Level:
    Root Administrator
    So does it show it as text? That is a mimetype issue if so.

    Do you have an htaccess setup for the nagios? That could be causing it. This is not a nagios issue but an apache configuration issue, nagios will run fine.

    You should have something like this in one of your apache configs:

    LoadModule php5_module modules/libphp5.so
    AddType application/x-httpd-php .php5 .php4 .php .php3 .php2 .phtml

    This of course assumes that NO php files are parsing anywhere, if they are its probably an htaccess on the nagios domain.
     
Loading...

Share This Page