/etc/httpd/conf.d/munin.conf

/etc/httpd/conf.d/munin.conf

サーバーに Munin と munin-node がインストールされ、httpd がインストールされています。ただし、インストール後にmunin-nodeを実行すると、ブラウザに次のエラーが表示されます。

Not Found

The requested URL /munin was not found on this server.

Apache/2.2.3 (Red Hat) Server at 192.168.5.1 Port 80

/etc/munin.confファイルを確認しましたが、Htmlディレクトリのパスが正しいです。

# Example configuration file for Munin, generated by 'make build'

# The next three variables specifies where the location of the RRD
# databases, the HTML output, and the logs, severally.  They all
# must be writable by the user running munin-cron.
dbdir   /var/lib/munin
htmldir /var/www/munin
logdir  /var/log/munin
rundir  /var/run/munin

/var/www/munin/ の権限は munin:munin に設定されます。

/etc/httpd/conf.d/munin.conf

# For SSL-servers
ScriptAlias /munin/cgi/ /var/www/munin/cgi/
#<Directory /var/www/munin/cgi/>
#   Options ExecCGI
#   SSLRequireSSL
#   order deny,allow
#   deny from all
#   AuthType Basic
#   AuthUserFile /site/cfg/passwd
#   AuthGroupFile /site/cfg/group
#   AuthName "munin"
#   require group munin
#   Satisfy Any
#</Directory>
#
Alias /munin/ /var/www/munin/
#<Directory /var/www/munin/>
#   Options None
#   SSLRequireSSL
#   order deny,allow
#   deny from all
#   AuthType Basic
#   AuthUserFile /site/cfg/passwd
#   AuthGroupFile /site/cfg/group
#   AuthName "munin"
#   require group munin
#   Satisfy Any
#</Directory>

Apacheログ

[Sun Sep 01 04:03:12 2013] [notice] Digest: generating secret for digest authentication ...
[Sun Sep 01 04:03:12 2013] [notice] Digest: done
[Sun Sep 01 04:03:12 2013] [notice] Apache/2.2.3 (Red Hat) configured -- resuming normal operations
[Sun Sep 01 11:34:47 2013] [notice] caught SIGTERM, shutting down
[Sun Sep 01 14:50:15 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sun Sep 01 14:50:15 2013] [notice] Digest: generating secret for digest authentication ...
[Sun Sep 01 14:50:15 2013] [notice] Digest: done
[Sun Sep 01 14:50:16 2013] [notice] Apache/2.2.3 (Red Hat) configured -- resuming normal operations
[Sun Sep 01 14:50:18 2013] [notice] caught SIGTERM, shutting down
[Sun Sep 01 14:50:18 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sun Sep 01 14:50:18 2013] [notice] Digest: generating secret for digest authentication ...
[Sun Sep 01 14:50:18 2013] [notice] Digest: done
[Sun Sep 01 14:50:18 2013] [notice] Apache/2.2.3 (Red Hat) configured -- resuming normal operations
[Sun Sep 01 14:50:41 2013] [error] [client 10.20.20.147] File does not exist: /var/www/html/munin
[Sun Sep 01 14:50:41 2013] [error] [client 10.20.20.147] File does not exist: /var/www/html/favicon.ico

/etc/httpd/conf.d/munin.confで一部のファイルのコメントを外した後

# For SSL-servers
ScriptAlias /munin/cgi/ /var/www/munin/cgi/
<Directory /var/www/munin/cgi/>
   Options ExecCGI
   #SSLRequireSSL
   order deny,allow
#   deny from all
   #deny from none
   allow from all
   AuthType Basic
   AuthUserFile /site/cfg/passwd
   AuthGroupFile /site/cfg/group
   AuthName "munin"
   require group munin
   Satisfy Any
</Directory>
#
Alias /munin/ /var/www/munin/
<Directory /var/www/munin/>
   Options None
   #SSLRequireSSL
   order deny,allow
#   deny from all
   #deny from none
   allow from all
   AuthType Basic
   AuthUserFile /site/cfg/passwd
   AuthGroupFile /site/cfg/group
   AuthName "munin"
   require group munin
   Satisfy Any
</Directory>

答え1

実際にはHTML、PNGファイルが生成されますが、そのファイルに設定されている権限は644ではなく640なのでapache読み取れません。だから解決策があります。 muninを次のように実行する必要があります。

su - munin --shell=/bin/bash munin-cron  

これにより、644 権限でチャートが更新され、apache読み取れるようになります。

答え2

次の行を追加します。 /etc/httpd/conf/httpd.conf

Alias /munin /var/www/munin
<Directory /var/www/munin>
    Options FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

ファイルを保存し、munin 構成ファイル全体を削除した後、apache および munin-node を再起動します。

/etc/init.d/httpd restart
 chkconfig --levels 235 munin-node on
 /etc/init.d/munin-node restart

関連情報