Page 1 of 4

Nagios interface won't display, php file downloaded instead

Posted: Mon Jan 06, 2014 4:31 pm
by agenerette
Hello,

I need a bit of help with an issue that I'm facing.

For installing Nagios on one of my Ubuntu VMsI've followed the instructions listed here:

http://nagios.sourceforge.net/docs/3_0/ ... buntu.html

when I try to go to http://<hosts address>/nagios, however, instead of displaying the web interface to Nagios,
my workstation browser downloads a file. Here's the first few lines of the file downloaded:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">

<html>
<head>
<meta name="ROBOTS" content="NOINDEX, NOFOLLOW">
<title>Nagios Core</title>
<link rel="shortcut icon" href="images/favicon.ico" type="image/ico">
</head>


-Anthony

Re: Nagios interface won't display, php file downloaded inst

Posted: Mon Jan 06, 2014 4:39 pm
by abrist
Is php installed?

Code: Select all

yum list installed | grep php

Re: Nagios interface won't display, php file downloaded inst

Posted: Mon Jan 06, 2014 5:08 pm
by ryan_terry
Looks like you have apache2 installed but not php.

Code: Select all

sudo apt-get install php5

Re: Nagios interface won't display, php file downloaded inst

Posted: Mon Jan 06, 2014 5:15 pm
by abrist
Let us know.

Re: Nagios interface won't display, php file downloaded inst

Posted: Mon Jan 06, 2014 5:24 pm
by agenerette
Oh, I believe php is installed:

root@ccb1:~# dpkg -l | grep php
ii libapache2-mod-php5 5.3.10-1ubuntu3.9 server-side, HTML-embedded scripting language (Apache 2 module)
ii php5 5.3.10-1ubuntu3.9 server-side, HTML-embedded scripting language (metapackage)
ii php5-cli 5.3.10-1ubuntu3.9 command-line interpreter for the php5 scripting language
ii php5-common 5.3.10-1ubuntu3.9 Common files for packages built from the php5 source
ii php5-gd

Re: Nagios interface won't display, php file downloaded inst

Posted: Mon Jan 06, 2014 5:34 pm
by abrist
Is apache loading the php module? What does your httpd.conf look like?

Re: Nagios interface won't display, php file downloaded inst

Posted: Mon Jan 06, 2014 5:42 pm
by agenerette
Whoa, I'm new to a lot of this, but it looks like /etc/apache2/httpd.conf is empty. I'm not sure how to go about setting it up properly, but I'll start researching this...

/etc/apache2/conf.d/nagios.conf looks to be significant. It's comments list:

# 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.

But I'm not sure how to go about using the file or its contents.

Re: Nagios interface won't display, php file downloaded inst

Posted: Mon Jan 06, 2014 5:44 pm
by abrist
That file should really be populated with defaults at the very least. Maybe the install was not completed successfully? What distro are you running?

Re: Nagios interface won't display, php file downloaded inst

Posted: Mon Jan 06, 2014 5:47 pm
by agenerette
root@ccb1:/etc/apache2/conf.d# lsb_release -a
Distributor ID: Ubuntu
Description: Ubuntu 12.04.3 LTS
Release: 12.04
Codename: precise

Re: Nagios interface won't display, php file downloaded inst

Posted: Mon Jan 06, 2014 5:50 pm
by abrist
Did you install apache and php through apt-get?