Can't access the Web interface of Nagios core

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.
Locked
Nisharunnisa
Posts: 6
Joined: Wed Apr 03, 2019 12:18 pm

Can't access the Web interface of Nagios core

Post by Nisharunnisa »

Hi all,
I have installed Nagios core in my local Ubuntu 18.04 LTS system using https://support.nagios.com/kb/article.php?id=96#Ubuntu
i faced no errors while installing but i am not able to access the web interface

Code: Select all

<?php
// Allow specifying main window URL for permalinks, etc.
$url = 'main.php';

if ("no" == "yes" && isset($_GET['corewindow'])) {

	// The default window url may have been overridden with a permalink...
	// Parse the URL and remove permalink option from base.
	$a = parse_url($_GET['corewindow']);

	// Build the base url.
	$url = htmlentities($a['path']).'?';
	$url = (isset($a['host'])) ? $a['scheme'].'://'.$a['host'].$url : '/'.$url;

	$query = isset($a['query']) ? $a['query'] : '';
	$pairs = explode('&', $query);
	foreach ($pairs as $pair) {
		$v = explode('=', $pair);
		if (is_array($v)) {
			$key = urlencode($v[0]);
			$val = urlencode(isset($v[1]) ? $v[1] : '');
			$url .= "&$key=$val";
		}
	}
	if (preg_match("/^http:\/\/|^https:\/\/|^\//", $url) != 1)
		$url = "main.php";
}

$this_year = '2019';
?>
<!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: <?php echo $_SERVER['SERVER_NAME']; ?></title>
	<link rel="shortcut icon" href="images/favicon.ico" type="image/ico">

	<script LANGUAGE="javascript">
		var n = Math.round(Math.random() * 10000000000);
		document.cookie = "NagFormId=" + n.toString(16);
	</script>
</head>

<frameset cols="180,*" style="border: 0px; framespacing: 0px">
	<frame src="side.php" name="side" frameborder="0" style="">
	<frame src="<?php echo $url; ?>" name="main" frameborder="0" style="">

	<noframes>
		<!-- This page requires a web browser which supports frames. -->
		<h2>Nagios Core</h2>
		<p align="center">
			<a href="https://www.nagios.org/">www.nagios.org</a><br>
			Copyright © 2010-<?php echo $this_year; ?> Nagios Core Development Team and Community Contributors.
			Copyright © 1999-2010 Ethan Galstad<br>
		</p>
		<p>
			<i>Note: These pages require a browser which supports frames</i>
		</p>
	</noframes>
</frameset>

</html>
This is index.php file of nagios, i dont understand why i am getting this when i try to access the Nagios core.
I would like to mention i already installed Nagios core on my system and worked on it earlier today i tried to install Nagios xi on my system where i faced some issues and since then i am not able to access Nagios core also
I some one can help me out i will be very thankful :)
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Can't access the Web interface of Nagios core

Post by npolovenko »

@Nisharunnisa, Just clarify, did you install Nagios XI and Nagios Core on the same server?

Can you confirm that this module is installed: libapache2-mod-php5?
Can you upload the list of all installed modules? You can run the following command and then upload the /tmp/nagios.txt file.
sudo apt list --installed > /tmp/nagios.txt
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Nisharunnisa
Posts: 6
Joined: Wed Apr 03, 2019 12:18 pm

Re: Can't access the Web interface of Nagios core

Post by Nisharunnisa »

Hi @npolovenko, thanks for the reply.
Yes, i have installed both Nagios XI and Nagios core on the same server. Initially I installed Nagios XI on VMplayer then while I am going through the doc i get to know we can install nagios XI on ubuntu system also then i tried installing Nagios XI on my system, since then i am not able to access both XI and core and also not able to access XI on VM player station also.
libapache2-mod-php5?
No this module is not installed in my system.
/tmp/nagios.txt
i am attaching the file please do have a look at it.

Thank you :)
Attachments
nagios.txt
(139.33 KiB) Downloaded 355 times
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Can't access the Web interface of Nagios core

Post by npolovenko »

@Nisharunnisa, In this case, you will be better off starting with a clean server, reinstalling CentOS or Ubuntu and then installing only one product, XI or Core.
We don't support or recommend installing two Nagios products on the same server. Also, Nagios XI already includes Core. So if you install XI, you can enter the following link in the browser:
Instead of:
Where 192.168.3.3 is the Nagios XI IP address. That will take you to the core interface.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Nisharunnisa
Posts: 6
Joined: Wed Apr 03, 2019 12:18 pm

Re: Can't access the Web interface of Nagios core

Post by Nisharunnisa »

How can i uninstall Nagios Core ?
Can i uninstall it and then again can i install XI on my system? will it work?
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Can't access the Web interface of Nagios core

Post by npolovenko »

@Nisharunnisa, The best way is to wipe the server(format), reinstall a clean copy of the OS and then install Nagios XI.
https://assets.nagios.com/downloads/nag ... -Linux.pdf
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Nisharunnisa
Posts: 6
Joined: Wed Apr 03, 2019 12:18 pm

Re: Can't access the Web interface of Nagios core

Post by Nisharunnisa »

@npolovenko Thank you so much for your time & response i will format and work on it
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Can't access the Web interface of Nagios core

Post by npolovenko »

@Nisharunnisa, You're welcome. Good luck and let us know if you'll have any other issues.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked