PDA

View Full Version : Pb Nagvis


florent_t
06-16-2008, 11:07 AM
Bonjour,

J'ai un probleme au niveau de nagvis: lorsque j'enleve l'authentification de nagios, nagvis m'affiche "No username was handed over at Nagvis..."
Je suis allé voir la FAQ de nagvis ou il est indiqué de creer un document .htaccess avec le text suivant: SetEnv REMOTE_USER username. C ce que j'ai fait: j'ai mis le .htaccess dans /usr/local/nagios/share/nagvis/ et j'ai changé le username par nagiosadmin.

Malheureusement, cela ne marche toujours pas..
Est ce que quelqu'un aurait une idée??

Merci d'avance.

Wolfgang
06-17-2008, 09:39 AM
I'm a bit confused because NagVis normally is installed below the nagios web directory so it should inherit the authencation given to Nagios.
Example: http://<nagios-host>/nagios should be the starting point for Nagios and http://<nagios-host>/nagios/nagvis should show the NagVis index page.
Given /usr/local/nagios/share as the Nagios web home directory NagVis should be installed in /usr/local/nagios/share/nagvis. You should not need another .htaccess file.

florent_t
06-19-2008, 01:18 PM
Thx for your answer wolfgang.
Nagvis is installed in the directory /usr/local/nagios/share/. This is why i don't understand why it isn't working.
Here is the nagios.conf file from /etc/httpd/conf.d :


# SAMPLE CONFIG SNIPPETS FOR APACHE WEB SERVER
# Last Modified: 11-26-2005
#
# This file contains examples of entries that need
# to be incorporated into your Apache web server
# configuration file. Customize the paths, etc. as
# needed to fit your system.

ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin"

<Directory "/usr/local/nagios/sbin">
SSLRequireSSL
Options ExecCGI
AllowOverride None
# AllowOverride AuthConfig Options
Order allow,deny
Allow from all
# Order deny,allow
# Deny from all
# Allow from 127.0.0.1
# AuthName "Nagios Access"
# AuthType Basic
# AuthUserFile /usr/local/nagios/etc/htpasswd.users
# Require valid-user
</Directory>

Alias /nagios "/usr/local/nagios/share"

<Directory "/usr/local/nagios/share">
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 Access"
# AuthType Basic
# AuthUserFile /usr/local/nagios/etc/htpasswd.users
# Require valid-user
</Directory>


Do you have an idea about the problem?

Wolfgang
06-19-2008, 07:47 PM
"AllowOverride None" will prevent Apache from processing .htaccess files. Change it to an appropriate value and you'll be able to access NagVis.

florent_t
07-03-2008, 11:52 AM
I finally make it worked!!! :D
Wolfgang, you were right: i put AllowOverride All and now it's OK.
I also put an .htaccess in nagvis directory with the following text:

Order Deny,Allow
Allow from ALL
SetEnv REMOTE_USER admin

Thx you very much wolfgang!!