Holger Levsen <holger@layer-acht.org> writes:
> http://lintian.debian.org/tags/dir-or-file-in-var-www.html nor
> debian-policy is helpful to resolve this issue - so I would like to
> discuss this here and come up with a good solution.
>
> Suggestions?
No package may touch /srv, but we could perhahs recommend its usage in
documentation or examples.
The package should generate html and graphs somewhere in /var/lib/munin,
possibly /var/lib/munin/html, and provide configuration examples for the
most common web servers.
A possible conflict:
Munin uses /var/lib/munin as the root of its dbdir, and if someone makes
a "html" domain for web servers, confusion may occur, as that directory
will store both the RRD files for that domain, as well as the generated
HTML.
Moving old data:
There should be no need to move old data. munin-graph should re-create
missing graphs on the first run. munin-html updates all web pages every
run.
We'll add a notice to NEWS.Debian:
,----[ NEWS.Debian ]
| The munin web root default location has moved from /var/www/munin to
| /var/lib/munin/html. To do this manually, you can:
|
| * Update "htmldir" in /etc/munin/munin.conf to point to
| /var/lib/munin/html.
|
| * Add configuration to your web server, see fragments in
| /usr/share/doc/munin/examples for your web server
|
| * Remove /var/www/munin when convenient.
`----
Configuration examples for common web servers:
The following configuration fragments could be placed in
/usr/share/doc/munin/examples/
This is for apache httpd. Add to /etc/apache2/conf.d/ to cover all
virtual hosts, or include in a virtual host:
,----[ /etc/apache2/conf.d/munin.conf ]
| Alias /munin /var/lib/munin/html
| <Directory /var/lib/munin/html>
| Order allow,deny
| Allow from localhost 127.0.0.0/8 ::1
| Options None
| </Directory>
`----
For nginx, you will have to add the following to an existing
virtualhost.
nginx in sid has ipv6 support, and this was enabled in the upload
yesterday, I guess an extra "allow ::1;" (or "allow [::1];") would do
the trick.
,----[ /etc/nginx/sites-enabled/default ]
| location /munin {
| alias /var/lib/munin/html;
| allow 127.0.0.0/8;
| deny all;
| }
`----
For lighttpd, we need something like the following. Note that this acl
example may not work with IPv6 enabled, since lighttpd does not do
subnet matching on IPv6 (http://redmine.lighttpd.net/issues/385)
,----[ /etc/lighttpd/conf-enabled/munin.conf ]
| alias.url += ( "/munin" => "/var/lib/munin/html" )
|
| $HTTP["url"] =~ "^/munin" {
| $HTTP["remoteip"] != "127.0.0.0/8" {
| url.access-deny = ( "" )
| }
| }
|
`----
--
Stig Sandbeck Mathisen
Attachment:
pgp6xx4TE5OGn.pgp
Description: PGP signature