New REST API not working
Posted: Wed Nov 11, 2015 8:30 am
Hi
I just upgraded to 5.2.1 but the REST API does not work
When I call
https://lbnss22/nagiosxi/api/v1/objects ... y&pretty=1
I get the following error
There is quite some config files in the httpd config directory. Maybe from previous stuff
Happy to delete everything except files needed for nagiosxi
I just upgraded to 5.2.1 but the REST API does not work
When I call
https://lbnss22/nagiosxi/api/v1/objects ... y&pretty=1
I get the following error
Looking into http error log it says
Looks like the reqrite rule does not work. Here the nagiosxi.conf of httpdFile does not exist: /usr/local/nagiosxi/html/api/v1/system, referer: https://lbnss22/nagiosxi/help/api.php?&=
Code: Select all
<Directory "/usr/local/nagiosxi/html">
# SSLRequireSSL
Options None
AllowOverride None
Order allow,deny
Allow from all
# Order deny,allow
# Deny from all
# Allow from 127.0.0.1
# AuthName "Nagios XI"
# AuthType Basic
# AuthUserFile /usr/local/nagiosxi/etc/htpasswd.users
# Require valid-user
</Directory>
Alias /nagiosxi "/usr/local/nagiosxi/html"
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule nagiosxi/api/v1/(.*)$ /usr/local/nagiosxi/html/api/v1/index.php?request=$1 [QSA,NC,L]
</IfModule>Code: Select all
# ll /etc/httpd/conf.d/
total 76
-rw-r--r--. 1 root root 330 Oct 3 2012 mrtg.conf
-rw-r--r--. 1 root root 1010 Dec 18 2014 nagios.conf
-rwxrwxrwx 1 root root 601 Nov 10 14:04 nagiosmobile.conf
-rw-r--r--. 1 root root 427 Nov 10 14:53 nagiosql.conf
-rw-r--r--. 1 root root 598 Nov 11 14:22 nagiosxi.conf
-rw-r----- 1 apache apache 2148 Sep 12 08:49 nagvis.conf
-rw-r----- 1 apache apache 2435 Sep 12 08:47 nagvis.conf.1442040462
-rw-r----- 1 apache apache 2435 Sep 12 08:49 nagvis.conf.1442040560
-rw-r--r--. 1 root root 344 Dec 18 2014 nrdp.conf
-rw-r--r-- 1 root root 1796 Apr 17 2014 perl.conf
-rw-r--r--. 1 root root 674 Oct 23 2014 php.conf
-rw-r--r--. 1 root root 392 Aug 15 2014 README
-rw-r--r--. 1 root root 10064 Nov 11 13:57 ssl.conf
-rw-r--r--. 1 root root 9473 Dec 18 2014 ssl.conf.nagiosxibackup
-rw-r--r--. 1 root root 299 Aug 15 2014 welcome.conf