URL Redirection

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: URL Redirection

Post by lmiltchev »

Did you add the following line:

Code: Select all

NameVirtualHost *:443
to the bottom of "/etc/httpd/conf/httpd.conf"?
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: URL Redirection

Post by tgriep »

Run this and post the output.

Code: Select all

cat /etc/httpd/conf/httpd.conf |grep VirtualHost
When you try to access the server, are you doing by IP address or a host name?

Try doing it by IP address and see if that works.
Be sure to check out our Knowledgebase for helpful articles and solutions!
NetAdmin
Posts: 1
Joined: Tue Jan 13, 2015 5:38 pm

Re: URL Redirection

Post by NetAdmin »

Not sure if I should just reply to an old post, but I have the exact same issue and it does work fine if I use IP instead of hostname as suggested - problem is there is no stated reason/solution for this. So how do I get it to work with hostname again?

Note this started for me when I added "Redirect permanent / https://<Your-XI-Server-Address-or-Hostname>" to /etc/httpd/conf.d/nagiosxi.conf as per page 3 of "How to Configure SSL for Nagios XI" document, but removing this (and restarting httpd) does not help.

Any assistance appreciated as search is not finding anything for me.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: URL Redirection

Post by tgriep »

I would make sure the host name that you are using is setup in your DNS server and that both the server and client can do a lookup of the hostname correctly.
Also, try clearing out the cache and cookies for your browser to see if that helps.

Additional information.

I had issues with Internet Explorer not redirecting, I changed the following and it seemed to resolve it.
Put a trailing forward slash on the end of the redirect like below and post back if it works for you.

Code: Select all

Redirect permanent / https://<Your-XI-Server-Address-or-Hostname>/
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked