"Invalid Host Header" after upgrade

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Post Reply
elpakko
Posts: 14
Joined: Fri Mar 22, 2019 1:07 am

"Invalid Host Header" after upgrade

Post by elpakko »

Hey.

I upgraded my Nagios XI to the newest version from the shell, using the package: http://assets.nagios.com/downloads/nagi ... est.tar.gz

During the upgrade I got the usual cpan and pip errors, as they are not able to connect http (we are using proxy, and I don't know how to configure the proxy for the cpan and pip). No worries here, I have seen these error during the previous upgrades as well.

Anyways, the upgrade finished without futher errors but now when trying to open the login page, I get the following in a blank white page:

"Invalid Host Header"

Any ideas how to fix this?
elpakko
Posts: 14
Joined: Fri Mar 22, 2019 1:07 am

Re: "Invalid Host Header" after upgrade

Post by elpakko »

Ok, it seems that using the FQDN of the host it works. If I remember correctly, before the upgrade it worked with both:

"https://nagiossrv/nagiosxi"
or
"https://nagiossrv.local.domain/nagiosxi"

FQDN is the subject of the certificate and the name without the domain is in the SAN field.

Now I had to change the "Program URL" in the "General Program Settings" to "https://nagiossrv/nagiosxi" to work again without the FQDN.

Is there a way to configure it to accept either of the formats?
elpakko
Posts: 14
Joined: Fri Mar 22, 2019 1:07 am

Re: "Invalid Host Header" after upgrade

Post by elpakko »

Keep talking to myself, but I managed to solve it by using the "External URL".

So the solution:

Program URL: https://nagiossrv/nagiosxi
External URL: https://nagiossrv.local.domain/nagiosxi
vornado
Posts: 85
Joined: Wed Jun 13, 2018 9:17 am

Re: "Invalid Host Header" after upgrade

Post by vornado »

Same issue here after the update. I found that it worked if I used the IP address, which I believe is what I had for "Program URL". Per someone's support forum advice, I added the URL I was using in my shortcut to "External URL" and it worked. I used the server name without the domain, so not FQDN.

Program URL: http://##.##.##.##/nagiosxi/
External URL: http://nagiossrv/nagiosxi/

It probably doesn't make a difference, but I have the ending forward slash on both entries. Also, my entries are http, not https.
sgardil
Posts: 349
Joined: Wed Aug 09, 2023 9:58 am

Re: "Invalid Host Header" after upgrade

Post by sgardil »

elpakko wrote: Fri Sep 27, 2024 6:01 am Keep talking to myself, but I managed to solve it by using the "External URL".

So the solution:

Program URL: https://nagiossrv/nagiosxi
External URL: https://nagiossrv.local.domain/nagiosxi
Glad you found a solution. We made a change for better security measures so thats why you saw this. Here is a link where you can read up a little more on it if you are curious. If theres anything else we can help with let us know.
Post Reply