New API error "No API Key provided"

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: New API error "No API Key provided"

Post by mcapra »

Looks like an issue in your ssl.conf. Specifically this line:

Code: Select all

RewriteRule nagiosxi/api/v1/(.*)$ /usr/local/nagiosxi/html/api/v1/index.php?request=$1[QSA,NC,L]
Has no space at the end of the request which is going to do some potentially nasty things to the rewrite. Add a space to the end and see if that fixes things:

Code: Select all

RewriteRule nagiosxi/api/v1/(.*)$ /usr/local/nagiosxi/html/api/v1/index.php?request=$1 [QSA,NC,L]
Be sure to restart/reload the httpd service afterwards :)
Former Nagios employee
https://www.mcapra.com/
User avatar
ScottG
Posts: 16
Joined: Fri Jul 01, 2016 9:21 am
Location: Fayetteville, AR
Contact:

Re: New API error "No API Key provided"

Post by ScottG »

mcapra wrote:Looks like an issue in your ssl.conf. Specifically this line:

Code: Select all

RewriteRule nagiosxi/api/v1/(.*)$ /usr/local/nagiosxi/html/api/v1/index.php?request=$1[QSA,NC,L]
Has no space at the end of the request which is going to do some potentially nasty things to the rewrite. Add a space to the end and see if that fixes things:

Code: Select all

RewriteRule nagiosxi/api/v1/(.*)$ /usr/local/nagiosxi/html/api/v1/index.php?request=$1 [QSA,NC,L]
Be sure to restart/reload the httpd service afterwards :)
Hooray! That was the ticket. Good eye. Thank you very much!
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: New API error "No API Key provided"

Post by mcapra »

Sure thing! Probably would've caught it earlier if I had ignored the usual suspects :)

Is it alright if we lock this thread and mark the issue as resolved?
Former Nagios employee
https://www.mcapra.com/
User avatar
ScottG
Posts: 16
Joined: Fri Jul 01, 2016 9:21 am
Location: Fayetteville, AR
Contact:

Re: New API error "No API Key provided"

Post by ScottG »

mcapra wrote:Is it alright if we lock this thread and mark the issue as resolved?
Go for it. Thanks again.
Locked