Reputation: 1571
I've installed Munin on my server but when I try to access the mypage.com/munin i get 403 error: Forbidden, You don't have permission to access /munin/ on this server.
My configuration is the following:
The file /etc/munin/apache.conf has the following configuration
Alias /munin /var/cache/munin/www
<Directory /var/cache/munin/www>
Order allow,deny
Allow from all
Options FollowSymLinks SymLinksIfOwnerMatch
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault M310
</IfModule>
</Directory>
The munin conf is /etc/munin/munin.conf
dbdir /var/lib/munin
htmldir /var/cache/munin/www
logdir /var/log/munin
rundir /var/run/munin
....
[myserver]
address 127.0.0.1
use_node_name yes
while the node configuration (/etc/munin/munin-node.conf) is the default one.
In the folder /var/cache/munin/www the graphs are not being generated because this folder is empty, but also the logs are not generated and I dont understand why.
Upvotes: 1
Views: 2406
Reputation: 118
Use the new version of Munin 2.0 !
Create and edit /etc/apt/sources.list.d/backports.list and add:
deb http://backports.debian.org/debian-backports squeeze-backports main
Update the repositories and then install munin
# apt-get update
# apt-get install munin -t squeeze-backports
This version of Munin defaults to using CGI to generate HTMLs and GRAPHs. So be sure to do this before configuring a virtual host:
# apt-get install libapache2-mod-fcgid
# a2enmod fcgid
Configure your virtual host:
<VirtualHost *:80>
DocumentRoot /var/cache/munin/www
ServerName munin.example.com
Alias /static /etc/munin/static
# Rewrites
RewriteEngine On
# HTML
RewriteCond %{REQUEST_URI} !^/static
RewriteCond %{REQUEST_URI} .html$ [or]
RewriteCond %{REQUEST_URI} =/
RewriteRule ^/(.*) /usr/lib/munin/cgi/munin-cgi-html/$1 [L]
# Images
# - remove path to munin-cgi-graph, if present
RewriteRule ^/munin-cgi/munin-cgi-graph/(.*) /$1
RewriteCond %{REQUEST_URI} !^/static
RewriteCond %{REQUEST_URI} .png$
RewriteRule ^/(.*) /usr/lib/munin/cgi/munin-cgi-graph/$1 [L]
# Ensure we can run (fast)cgi scripts
ScriptAlias /munin-cgi/munin-cgi-graph /usr/lib/munin/cgi/munin-cgi-graph
<Location /munin-cgi/munin-cgi-graph>
Options +ExecCGI
<IfModule mod_fcgid.c>
SetHandler fcgid-script
</IfModule>
<IfModule !mod_fcgid.c>
SetHandler cgi-script
</IfModule>
Allow from all
</Location>
ScriptAlias /munin-cgi/munin-cgi-html /usr/lib/munin/cgi/munin-cgi-html
<Location /munin-cgi/munin-cgi-html>
Options +ExecCGI
<IfModule mod_fcgid.c>
SetHandler fcgid-script
</IfModule>
<IfModule !mod_fcgid.c>
SetHandler cgi-script
</IfModule>
Allow from all
</Location>
<Location />
Options +ExecCGI
<IfModule mod_fcgid.c>
SetHandler fcgid-script
</IfModule>
<IfModule !mod_fcgid.c>
SetHandler cgi-script
</IfModule>
Allow from all
</Location>
<Location /static/>
SetHandler None
Allow from all
</Location>
<Directory /var/cache/munin/www>
Order allow,deny
#Allow from localhost 127.0.0.0/8 ::1
Allow from all
Options None
# Set the default expiration time for files to 5 minutes 10 seconds from
# their creation (modification) time. There are probably new files by
# that time.
#
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault M310
</IfModule>
</Directory>
</VirtualHost>
And finally, start to enjoy the new version of Munin
# a2ensite munin
# /etc/init.d/apache2 reload
Now you can access to munin in http://munin.example.com after a few minutes. Let munin collect some data first.
Upvotes: 1