Apache configuration

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
admincauce
Posts: 34
Joined: Wed Sep 19, 2018 3:20 am

Apache configuration

Post by admincauce »

Hi to everybody

I have a nagios version 4.3.4 on a Centos 7. I need to perform the following configuration and it is the following. When I make a request to http://mydomain.com I am automatically redirected to http://mydomain.com/nagios

Thank you very much in advance.
pepe_carlos
Posts: 43
Joined: Wed Aug 17, 2011 9:09 am
Location: Madrid, Spain

Re: Apache configuration

Post by pepe_carlos »

Hi,

You can make this action in your index.html of apache (usually in /var/www/html directory):

Code: Select all

<html>
<meta HTTP-EQUIV="REFRESH" content="0; url=/nagios">
<body>
</body></html>
Regards
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Apache configuration

Post by scottwilkerson »

pepe_carlos wrote:Hi,

You can make this action in your index.html of apache (usually in /var/www/html directory):

Code: Select all

<html>
<meta HTTP-EQUIV="REFRESH" content="0; url=/nagios">
<body>
</body></html>
Regards
The above should do it, otherwise you would need to modify the apache config to have something like this

Code: Select all

RewriteEngine On
RewriteRule ^/$ /nagios [L,R=301]
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked