Page 1 of 1
When using FQDN as URL, Views page asks for login
Posted: Fri Oct 09, 2020 9:34 am
by WillH
When using the plain language DNS or FQDN in the url, going to Views prompts the users to enter their credentials.
Example:
https://OurFusion/nagiosfusion or
https://OurFusion.ourdomain.com/nagiosfusion behave this way
https://192.168.1.200/nagiosfusion works as expected, displaying the views and cycling through them
After entering credentials the app either redirects them to the IP address style of address, and another login, OR it gives them the "NSP: Sorry Dave, I can't let you do that" error message
Screen shot attached.
Re: When using FQDN as URL, Views page asks for login
Posted: Fri Oct 09, 2020 3:52 pm
by ssax
This is because of SSL and how it works, those are all different hosts in terms of SSL connections (short name vs FQDN vs IP when different from what you have in the address bar of your browser will force you to login to the others) which is why that occurs, they all need to match (or you need to force apache to redirect them to what you want).
What URL do you go to when you open up your address bar?
What do you have set for Admin > System Settings > Internet URL and Public URL?
Re: When using FQDN as URL, Views page asks for login
Posted: Mon Oct 12, 2020 8:21 am
by WillH
The internal URL and public URL are both set to http://<severname>/nagiosfusion
When using this URL, and using the Views sub page, the user is either redirected to the IP address and the login, or it will put the login page nested into the frame
Re: When using FQDN as URL, Views page asks for login
Posted: Mon Oct 12, 2020 4:15 pm
by ssax
It looks like those links use the IP address on my system as well, I'm looking at the code and will update you shortly.
Re: When using FQDN as URL, Views page asks for login
Posted: Mon Oct 12, 2020 4:23 pm
by ssax
Please click Views > Manage My Views:
- Edit the links and change them from IP address to the URL you are using in your web browsers address bar
Then test.
If they aren't IP addresses, let me know.
Re: When using FQDN as URL, Views page asks for login
Posted: Mon Oct 12, 2020 5:14 pm
by WillH
Ah, that's the trick. It seems we have one, or the other.
Re: When using FQDN as URL, Views page asks for login
Posted: Tue Oct 13, 2020 3:39 pm
by ssax
On the backend it's using $_SERVER['SERVER_NAME'] for the links so it's likely defaulting to the IP address/whatever is returned by apache ServerName directive when building those URLs.
I noticed that if I changed the ServerName apache variable/restarted httpd and then created a new user it would use that new SERVER_NAME for new users views. The others would need to be changed manually like you did, it only works on new user creation when creating those default dashboards.