LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File nagvis-include.conf of Package nagvis (Project home:jdbungart:monitoring)

# nagvis apache configuration
# to enable this directive, please set 
# APACHE_SERVER_FLAGS="NAGVIS" in /etc/sysconfig/apache2
<IfDefine NAGVIS>
    Alias /nagvis /usr/share/nagvis/share

    <Directory /usr/share/nagvis/share>
        Order allow,deny
        Allow from all
        Options FollowSymLinks
		# 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/nagios/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]