Nagvis " You are not authenticated"

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
sufian_bd
Posts: 3
Joined: Thu Jul 02, 2015 1:38 am

Nagvis " You are not authenticated"

Post by sufian_bd »

Hello,

I am trying to installed Nagvis at Nagios Core. But when i use username & password it shows "You are not authenticated".

I already tried automatic installation via apt-get install nagvis & also manual method but no luck. please help me.



Thanks
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Nagvis " You are not authenticated"

Post by abrist »

What version of core and nagvis are you running?
Can you post the apache vhost config for nagvis?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
sufian_bd
Posts: 3
Joined: Thu Jul 02, 2015 1:38 am

Re: Nagvis " You are not authenticated"

Post by sufian_bd »

here is the apache2 virtual host config file

# NagVis Apache2 sample configuration file
#
# #############################################################################

Alias /nagvis "/usr/share/nagvis/share/"

<Directory "/usr/share/nagvis/share/">
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all

# To enable Nagios basic auth on NagVis use the following options
# Just uncomment it. Maybe you need to adjust the path to the
# Auth user file.
#
# If you use the NagVis internal auth mechanism based on the web
# for you won't need this.
#
#AuthName "NagVis Access"
#AuthType Basic
#AuthUserFile /usr/local/nagios/etc/htpasswd.users
#Require valid-user

# With installed and enabled mod_rewrite there are several redirections
# available to fix deprecated and/or wrong urls. None of those rules is
# mandatory to get NagVis working.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /nagvis

# Use mod_rewrite for old url redirection even if there are php files which
# redirect the queries itselfs. In some cases the mod_rewrite redirect
# is better than the php redirect.
#
# Using the php redirect seems to be better in some cases where https/http servers
# are mixed. For example in OMD setups where using apache own mode and https in the
# frontend and http in the backend apache servers.
#
# 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]

# 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>
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: Nagvis " You are not authenticated"

Post by lmiltchev »

Why did you comment out the lines below?
#AuthName "NagVis Access"
#AuthType Basic
#AuthUserFile /usr/local/nagios/etc/htpasswd.users
#Require valid-user
Change them to:

Code: Select all

AuthName "NagVis Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user
restart apache and try logging in NagVis again.
Be sure to check out our Knowledgebase for helpful articles and solutions!
sufian_bd
Posts: 3
Joined: Thu Jul 02, 2015 1:38 am

Re: Nagvis " You are not authenticated"

Post by sufian_bd »

Thanks it works
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Nagvis " You are not authenticated"

Post by tmcdonald »

I'll be closing this thread now, but feel free to open another if you need anything in the future!
Former Nagios employee
Locked