Nagios interface won't display, php file downloaded instead

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
agenerette
Posts: 50
Joined: Wed Jul 25, 2012 5:09 pm

Nagios interface won't display, php file downloaded instead

Post 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
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

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

Post by abrist »

Is php installed?

Code: Select all

yum list installed | grep php
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
ryan_terry
Posts: 4
Joined: Mon Jan 06, 2014 1:05 pm

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

Post by ryan_terry »

Looks like you have apache2 installed but not php.

Code: Select all

sudo apt-get install php5
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

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

Post by abrist »

Let us know.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
agenerette
Posts: 50
Joined: Wed Jul 25, 2012 5:09 pm

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

Post 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
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

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

Post by abrist »

Is apache loading the php module? What does your httpd.conf look like?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
agenerette
Posts: 50
Joined: Wed Jul 25, 2012 5:09 pm

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

Post 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.
Last edited by agenerette on Mon Jan 06, 2014 5:46 pm, edited 1 time in total.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

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

Post 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?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
agenerette
Posts: 50
Joined: Wed Jul 25, 2012 5:09 pm

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

Post 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
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

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

Post by abrist »

Did you install apache and php through apt-get?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked