Page 1 of 1

Modify URL?

Posted: Mon May 20, 2019 7:16 pm
by DrewDennis
Hey gang - how do I modify the landing URL for NagiosXI? Currently it is http://servername/NagiosXI. How do I change it to be just Http://servername ?

Thanks

Drew

Re: Modify URL?

Posted: Tue May 21, 2019 2:52 pm
by npolovenko
@DrewDennis, I haven't fully tested this out but the solution seems to be working. Open the following Apache configuration:

Code: Select all

/etc/httpd/conf.d/nagiosxi.conf
Find this section at the bottom:

Code: Select all

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule nagiosxi/api/v1/(.*)$ /usr/local/nagiosxi/html/api/v1/index.php?request=$1 [QSA,NC,L]
</IfModule>
And add the following line:

Code: Select all

RedirectMatch ^/$ /nagiosxi/
So the whole block would look like this:

Code: Select all

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule nagiosxi/api/v1/(.*)$ /usr/local/nagiosxi/html/api/v1/index.php?request=$1 [QSA,NC,L]
RedirectMatch ^/$ /nagiosxi/
</IfModule>
Save the file and restart apache with:

Code: Select all

service httpd restart

Re: Modify URL?

Posted: Wed May 22, 2019 11:48 am
by DrewDennis
That did it! Thanks!

D

Re: Modify URL?

Posted: Wed May 22, 2019 12:51 pm
by benjaminsmith
Hello Drew,
That did it! Thanks!
Great! Did you have any other questions or may we close this thread?

Thanks.