Page 2 of 2

Re: Need help to migrate nagios core virtual config to nagio

Posted: Thu May 04, 2017 1:30 pm
by tmcdonald
You should use an existing vhost file from a standard XI server as reference then. For just the XI parts, here is mine from a 5.4.3 XI machine:

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>
There are others though that you will want to add, so I would definitely set up a standard XI so you can do a side-by-side comparison and make adjustments to fit your policy as needed.