redirect from root url?

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
jriker1
Posts: 115
Joined: Tue Dec 15, 2015 8:40 pm

redirect from root url?

Post by jriker1 »

I have Nagios running and server is called nagios. If I go to http://nagios I get a blank page. Need to go to http://nagios/nagios.

Is it possible to force redirect to the nagios subfolder from the root?

This is running CoreOS

Thanks.

JR
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: redirect from root url?

Post by rkennedy »

Yes, you should be able to create a file called index.php in /var/www/.

Paste the following inside of it, changing x.x.x.x to your IP or hostname of the Nagios server, and http to https as needed.

Code: Select all

<?php
header("Location: http://x.x.x.x/nagios/");
die();
?>
Former Nagios Employee
Locked