# NagVis Apache2 sample configuration file # # ############################################################################# Alias /nagvis "/usr/share/nagvis/share" Options FollowSymLinks AllowOverride None # Django : 2015-04-20 # default: Order allow,deny # Allow from all Require IP 10.0 # 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/share/icinga2/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. 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]