Page 2 of 2
Re: New API error "No API Key provided"
Posted: Thu Sep 15, 2016 1:25 pm
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

Re: New API error "No API Key provided"
Posted: Thu Sep 15, 2016 1:28 pm
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!
Re: New API error "No API Key provided"
Posted: Thu Sep 15, 2016 1:32 pm
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?
Re: New API error "No API Key provided"
Posted: Thu Sep 15, 2016 1:46 pm
by ScottG
mcapra wrote:Is it alright if we lock this thread and mark the issue as resolved?
Go for it. Thanks again.