NagVis Apache Help

Andrew Fay Andrew.Fay at ajl.co.uk
Thu Jan 6 15:53:31 CET 2011


hi,

I have nagios3 and a copy of nagvis running on an ubuntu box.. when I
click on a host in Nagvis I get :

The requested URL /nagios/cgi-bin/status.cgi was not found on this
server.

http://server/nagios/cgi-bin/status.cgi?host=localhost

it should be

http://server/nagios3/cgi-bin/status.cgi?host=localhost

Basically The CGI's work for standard Nagios but not for NagVis, so how
can I tell NagVis where to look for the CGI's?

 

This is the apache cfg for nagvis :

# NagVis Apache2 sample configuration file
#
#
########################################################################
#####
 
 
Alias /nagvis "/etc/nagvis/share"
 
<Directory "/etc/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 /etc/nagios3/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.
    RewriteCond %{REQUEST_URI} ^/nagvis(/index\.php|/|)(\?.*|)$
    RewriteRule ^(index\.php|)(\?.*|)$ /nagvis/frontend/nagvis-js/$1$2
[R=301,L]
    RewriteCond %{REQUEST_URI} ^/nagvis/config\.php.*$
    RewriteRule ^config\.php(.*) /nagvis/frontend/wui/$1 [R=301,L]
 
    # Redirect old regular map links
    RewriteCond %{REQUEST_URI} ^/nagvis/frontend/nagvis-js
    RewriteCond %{QUERY_STRING} map=(.*)
    RewriteRule ^(.*)$
/nagvis/frontend/nagvis-js/index.php?mod=Map&act=view&show=%1 [R=301,L]
 
    # Redirect old wui map links
    RewriteCond %{REQUEST_URI} ^/nagvis/frontend/wui
    RewriteCond %{QUERY_STRING} map=(.*)
    RewriteRule ^(.*)$
/nagvis/frontend/wui/index.php?mod=Map&act=edit&show=%1 [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>

Nagios apache config :

# apache configuration for nagios 3.x
# note to users of nagios 1.x and 2.x:
#   throughout this file are commented out sections which preserve
#   backwards compatibility with bookmarks/config for older nagios
versios.
#   simply look for lines following "nagios 1.x:" and "nagios 2.x"
comments.
 
ScriptAlias /cgi-bin/nagios3 /usr/lib/cgi-bin/nagios3
ScriptAlias /nagios3/cgi-bin /usr/lib/cgi-bin/nagios3
# nagios 1.x:
#ScriptAlias /cgi-bin/nagios /usr/lib/cgi-bin/nagios3
#ScriptAlias /nagios/cgi-bin /usr/lib/cgi-bin/nagios3
# nagios 2.x: 
#ScriptAlias /cgi-bin/nagios2 /usr/lib/cgi-bin/nagios3
#ScriptAlias /nagios2/cgi-bin /usr/lib/cgi-bin/nagios3
 
# Where the stylesheets (config files) reside
Alias /nagios3/stylesheets /etc/nagios3/stylesheets
# nagios 1.x:
#Alias /nagios/stylesheets /etc/nagios3/stylesheets
# nagios 2.x:
#Alias /nagios2/stylesheets /etc/nagios3/stylesheets
 
# Where the HTML pages live
Alias /nagios3 /usr/share/nagios3/htdocs
# nagios 2.x: 
#Alias /nagios2 /usr/share/nagios3/htdocs
# nagios 1.x:
#Alias /nagios /usr/share/nagios3/htdocs
 
<DirectoryMatch
(/usr/share/nagios3/htdocs|/usr/lib/cgi-bin/nagios3|/etc/nagios3/stylesh
eets)>
    Options FollowSymLinks
 
    DirectoryIndex index.php
 
    AllowOverride AuthConfig
    Order Allow,Deny
    Allow From All
 
    AuthName "Nagios Access"
    AuthType Basic
    AuthUserFile /etc/nagios3/htpasswd.users
    # nagios 1.x:
    #AuthUserFile /etc/nagios/htpasswd.users
    require valid-user
</DirectoryMatch>
 
# Enable this ScriptAlias if you want to enable the grouplist patch.
# See http://apan.sourceforge.net/download.html for more info
# It allows you to see a clickable list of all hostgroups in the
# left pane of the Nagios web interface
# XXX This is not tested for nagios 2.x use at your own peril
#ScriptAlias /nagios3/side.html /usr/lib/cgi-bin/nagios3/grouplist.cgi
# nagios 1.x:
#ScriptAlias /nagios/side.html /usr/lib/cgi-bin/nagios3/grouplist.cgi

Thanks

 

 

---------------------------

 

Andrew 





 



------------------------------------------------------------------------------------------------
Disclaimer statement by ABERDEEN JOURNALS LTD - 6/1/2011
The information or images contained within this e-mail are of a confidential nature. If you are
not the intended recipient please forward it to BadMail at ajl.co.uk and delete the message 
from your system. 
Opinions, conclusions and other information in this message that do not relate to the official 
business of Aberdeen Journals Ltd shall be understood as neither given nor endorsed by it.

Aberdeen Journals Ltd, PO Box 43, Lang Stracht, Mastrick, Aberdeen. AB15 6DF.
Tel: +44 (0)1224 690222  | Fax +44 (0)1224 685753 | Registered No: 15256 Scotland.

PLEASE CONSIDER THE ENVIRONMENT BEFORE PRINTING THIS EMAIL
------------------------------------------------------------------------------------------------



o----------------------------------------------------------------------o
This Email has been scanned for viruses by Aberdeen
Journals' Outbound Email Security Systems.
o----------------------------------------------------------------------o
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20110106/78689a99/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null


More information about the Users mailing list