서버에 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>
아파치 로그
[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