Page 1 of 1

Nagvis Authenticate Error

Posted: Mon Mar 17, 2014 7:58 am
by dhinesh
Hi,
While I'm trying to access Nagvis, got the below error.

Unable to authenticate user. The environment variable PHP_AUTH_USER is not set or empty.

Re: Nagvis Authenticate Error

Posted: Mon Mar 17, 2014 10:42 am
by slansing
Please see this thread and verify/make the changes specified by lmiltchev, let us know if it helps:

http://support.nagios.com/forum/viewtop ... 35&p=62339

Re: Nagvis Authenticate Error

Posted: Wed Mar 19, 2014 7:47 am
by dhinesh
Hi.,
I"m unable to open the thread.

Re: Nagvis Authenticate Error

Posted: Wed Mar 19, 2014 9:20 am
by tmcdonald
I will directly quote what is relevant from that thread:
lmiltchev wrote: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:

Code: Select all

logonenvvar="PHP_AUTH_USER"
so that it will look like this:

Code: Select all

; logonenvvar="PHP_AUTH_USER"
Restart apache:

Code: Select all

service httpd restart
Let me know if this worked.

Re: Nagvis Authenticate Error

Posted: Wed Mar 19, 2014 11:13 am
by dhinesh
Thanks...
It is working fine now.. :D

Re: Nagvis Authenticate Error

Posted: Wed Mar 19, 2014 11:58 am
by slansing
Awesome! Sorry that I posted a link from a section you cannot view, glad its all figured out now.