Code

Properly set "Options FollowSymLinks" in the apache configuration
[pkg-nagvis.git] / debian / apache.conf
index 8d21c711e02bbb1105e87df2b972e6f41ce3907a..cc7cd5e51370f708882b19189e7cd5c74d541604 100644 (file)
@@ -1,4 +1,28 @@
-<Location /nagios3/nagvis>
+# -- new style
+Alias /nagvis/nagvis/templates /etc/nagvis/templates
+Alias /nagvis/nagvis/gadgets /etc/nagvis/gadgets
+Alias /nagvis/nagvis/images /var/lib/nagvis/images
+Alias /nagvis /usr/share/nagvis/htdocs
+
+# the FollowSymlinks option is only considere in a directory section, not
+# in a DirectoryMatch section.  Setting it here.
+<Directory /usr/share/nagvis/htdocs>
+    Options FollowSymLinks
+</Directory>
+
+# -- old style
+# Alias /nagios3/nagvis /usr/share/nagvis/htdocs
+
+# -- use basic authentification from nagios3 package
+#    please adapt to your needs
+<DirectoryMatch (/usr/share/nagvis/htdocs|etc/nagvis(templates|gadgets)|/var/lib/nagvis)>
        DirectoryIndex index.php
-</Location>
 
+        Order Allow,Deny
+        Allow From All
+
+        AuthName "NagVis Access"
+        AuthType Basic
+        AuthUserFile /etc/nagios3/htpasswd.users
+       require valid-user
+</DirectoryMatch>