Page 1 of 1
Nagvis not working.
Posted: Sat Sep 07, 2013 3:22 am
by ewilliams
Hi. I have just tried to use Nagvis on our install of NagiosXI 2012R2.2 and I get the following error on a red box:
"Unable to authenticate user. The environment variable PHP_AUTH_USER is not set or empty."
I have then gone through this article
http://assets.nagios.com/downloads/nagi ... ith_XI.pdf but still getting the same problem.
Checking Nagvis under the manage components and it has:
Nagvis
This component brings Nagvis into the maps menu inside of XI.
Version: 1.12 Author: Nagios Enterprises, LLC
What am I doing wrong here?
i even tried the steps outlined here
http://support.nagios.com/forum/viewtop ... vis#p46843 and logged into nagiosxi as the nagiosadmin account but same issue.
Re: Nagvis not working.
Posted: Mon Sep 09, 2013 9:42 am
by lmiltchev
Can you post your "/etc/httpd/conf.d/nagvis.conf" file so that we can take a look at it?
Re: Nagvis not working.
Posted: Tue Sep 10, 2013 7:15 am
by ewilliams
# vi /etc/httpd/conf.d/nagvis.conf
#new # Just uncomment it. Maybe you need to adjust the path to the
#new # Auth user file.
#new #
#new # If you use the NagVis internal auth mechanism based on the web
#new # for you won't need this.
#new #
AuthName "NagVis Access"
AuthType Basic
AuthUserFile /usr/local/nagiosxi/etc/htpasswd.users
Require valid-user
#new
#new # With installed and enabled mod_rewrite there are several redirections
#new # available to fix deprecated and/or wrong urls. None of those rules is
#new # mandatory to get NagVis working.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /nagvis
#new # Use mod_rewrite for old url redirection even if there are php files which
#new # redirect the queries itselfs. In some cases the mod_rewrite redirect
#new # is better than the php redirect.
#new #
#new # Using the php redirect seems to be better in some cases where https/http servers
#new # are mixed. For example in OMD setups where using apache own mode and https in the
#new # frontend and http in the backend apache servers.
#new #
#new # Disabling this redirect by default in the hope that the php direct works better.
#RewriteCond %{REQUEST_URI} ^/nagvis(/config\.php|/index\.php|/|)(\?.*|)$
#RewriteRule ^(.*)$ /nagvis/frontend/nagvis-js/%1%2 [R=301,L]
# Redirect old regular map links
RewriteCond %{REQUEST_URI} ^/nagvis/frontend/(wui|nagvis-js)
RewriteCond %{QUERY_STRING} map=(.*)
RewriteRule ^(.*)$ /nagvis/frontend/nagvis-js/index.php?mod=Map&act=view&show=%1 [R=301,L]
# Without map= param
RewriteCond %{REQUEST_URI} ^/nagvis/frontend(/wui)?/?(index.php)?$
RewriteRule ^(.*)$ /nagvis/frontend/nagvis-js/index.php [R=301,L]
#new # Redirect old rotation calls
RewriteCond %{REQUEST_URI} ^/nagvis/frontend/nagvis-js
RewriteCond %{QUERY_STRING} !mod
RewriteCond %{QUERY_STRING} rotation=(.*)
RewriteRule ^(.*)$ /nagvis/frontend/nagvis-js/index.php?mod=Rotation&act=view&show=%1 [R=301,L]
</IfModule>
</Directory>
Re: Nagvis not working.
Posted: Tue Sep 10, 2013 11:12 am
by lmiltchev
Make sure you have all these lines commented out in the "/etc/httpd/conf.d/nagvis.conf" file:
Code: Select all
# AuthName "NagVis Access"
# AuthType Basic
# AuthUserFile /usr/local/nagiosxi/etc/htpasswd.users
# Require valid-user
Then, add the following lines on the bottom of the file (
under the "</Directory>" line):
Code: Select all
RewriteEngine on
RewriteLock var/log/rewrite.lck
RewriteLog /dev/null
RewriteLogLevel 0
RewriteRule /nagvis/ - [E=REMOTE_USER:nagiosadmin]
Open the "/usr/local/nagvis/etc/nagvis.ini.php" file in a text editor, and comment out this line:
so that it will look like this:
Restart apache:
Let me know if this worked.