Solved

Having Munin/Apache (on CentOS) setup problems - Directory index forbidden by Options directive: /var/www/munin/

Posted on 2010-11-20
3
2,902 Views
Last Modified: 2012-05-10
Am running these RPM packages on a CentOS 5.5 VM:

munin-1.4.5-4.el5
munin-common-1.4.5-4.el5
munin-node-1.4.5-4.el5


what's generated in error_log

Directory index forbidden by Options directive: /var/www/munin/

Open in new window


I haven't changed anything in munin.conf; right now I'm only trying to monitor the localhost.

I can telnet to 4949 on the localhost, but then I can't list any plugins

here's munin-node.conf

log_level 4
log_file /var/log/munin/munin-node.log
pid_file /var/run/munin/munin-node.pid

background 1
setsid 1

user root
group root

# Regexps for files to ignore

ignore_file ~$
#ignore_file [#~]$  # FIX doesn't work. '#' starts a comment
ignore_file DEADJOE$
ignore_file \.bak$
ignore_file %$
ignore_file \.dpkg-(tmp|new|old|dist)$
ignore_file \.rpm(save|new)$
ignore_file \.pod$
allow ^127\.0\.0\.1$
host *
port 4949

Open in new window


got this in the httpd access_log:

"GET /icons/image2.gif HTTP/1.1" 304 - "http://10.0.1.10/munin/"

Open in new window


I go to http://10.0.1.10/munin/

I am prompted for login, I provide the munin user and pwd. I authenticate correctly, but then I get this:

You don't have permission to access /munin/ on this server.

Here is my relevant Alias setup in httpd.conf

Alias /munin /var/www/munin/

<directory /var/www/munin/>
        AllowOverride None
 	Options ExecCGI FollowSymlinks
        AddHandler cgi-script .cgi
        DirectoryIndex index.cgi
        AuthUserFile /etc/munin/munin.passwd
        AuthType basic
        AuthName "Munin stats"
        require valid-user
</directory>

Open in new window


other permissions:

l
s -la /var/lib/munin/
total 32
drwxr-xr-x  3 munin munin 4096 Nov 21 00:15 .
drwxr-xr-x 26 root  root  4096 Nov 18 00:37 ..
-rw-r--r--  1 munin munin   14 Nov 21 00:15 datafile
-rw-r--r--  1 munin munin   14 Nov 21 00:15 limits
-rw-r--r--  1 munin munin   14 Nov 21 00:15 munin-graph.stats
-rw-r--r--  1 munin munin   36 Nov 21 00:15 munin-update.stats
drwxr-xr-x  2 munin munin 4096 Jul 18 22:36 plugin-state

Open in new window


ls -la /var/log/munin
total 60
drwxr-xr-x  2 munin munin  4096 Nov 18 01:07 .
drwxr-xr-x 16 root  root   4096 Nov 18 00:37 ..
-rw-r--r--  1 munin munin  3354 Nov 21 00:15 munin-graph.log
-rw-r--r--  1 munin munin 10981 Nov 21 00:15 munin-html.log
-rw-r--r--  1 munin munin  4992 Nov 21 00:15 munin-limits.log
-rw-r--r--  1 munin munin  5293 Nov 21 00:15 munin-node.log
-rw-r--r--  1 munin munin 12556 Nov 21 00:15 munin-update.log

Open in new window


ls -la /var/www/html/munin
total 96
drwxrwxr-x 4 munin munin 4096 Nov 18 00:40 .
drwxr-xr-x 3 root  root  4096 Nov 20 23:38 ..
drwxrwxr-x 2 munin munin 4096 Nov 18 00:37 cgi
-rwxrwxr-x 1 munin munin 2555 Nov 18 00:40 definitions.html
-rwxrwxr-x 1 munin munin 2046 Nov 18 00:40 favicon.ico
-rwxrwxr-x 1 munin munin  864 Jul 18 22:36 .htaccess
-rwxrwxr-x 1 munin munin 1794 Nov 18 00:40 logo-h.png
-rwxrwxr-x 1 munin munin  473 Nov 18 00:40 logo.png
-rwxrwxr-x 1 munin munin 1700 Nov 10  2009 munin-comparison-day.tmpl
-rwxrwxr-x 1 munin munin 1705 Nov 10  2009 munin-comparison-month.tmpl
-rwxrwxr-x 1 munin munin 1702 Nov 10  2009 munin-comparison-week.tmpl
-rwxrwxr-x 1 munin munin 1702 Nov 10  2009 munin-comparison-year.tmpl
-rwxrwxr-x 1 munin munin 3461 Nov 10  2009 munin-domainview.tmpl
-rwxrwxr-x 1 munin munin  849 Apr 29  2009 munin-htaccess.in
-rwxrwxr-x 1 munin munin 2368 Nov 11  2009 munin-nodeview.tmpl
-rwxrwxr-x 1 munin munin 6401 Nov 19  2009 munin-overview.tmpl
-rwxrwxr-x 1 munin munin 5912 Nov 11  2009 munin-serviceview.tmpl
drwxrwxr-x 2 munin munin 4096 Nov 18 00:37 partial
-rwxrwxr-x 1 munin munin 3619 Oct 30  2009 style-1.2.css
-rwxrwxr-x 1 munin munin 5351 Nov 18 00:40 style.css

Open in new window


I know its permissions, but I'm very, very junior in apache. thanks in advance


0
Comment
Question by:kapshure
  • 2
3 Comments
 

Author Comment

by:kapshure
Comment Utility
oh, and i also ran this:

htpasswd -c /etc/munin/munin.passwd munin

Open in new window

0
 
LVL 13

Accepted Solution

by:
dsmile earned 250 total points
Comment Utility
In httpd.conf, try to use this instead

Two lines added:
        Allow from all
        Order allow,deny
Alias /munin /var/www/munin/



<directory /var/www/munin/>

        AllowOverride None

        Options ExecCGI FollowSymlinks

        Allow from all

        Order allow,deny

        AddHandler cgi-script .cgi

        DirectoryIndex index.cgi

        AuthUserFile /etc/munin/munin.passwd

        AuthType basic

        AuthName "Munin stats"

        require valid-user

</directory>

Open in new window

0
 

Author Comment

by:kapshure
Comment Utility
@dsmile.

i haven't had a chance to try this yet. will be trying this tonight. thanks for the feedback. im sure it was something simple.. just gotta get my apache skills honed better.
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now