Page 1 of 1

redirect from root url?

Posted: Tue Feb 02, 2016 4:30 pm
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

Re: redirect from root url?

Posted: Tue Feb 02, 2016 4:44 pm
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();
?>