2014-06-24 2 views
1

나는이 점에 관해서 약간의 질문을 보았지만, 불행히도 그것이 내 문제를 해결하지 못한다. 가상 머신의 OpenSuse에서 Nagios를 성공적으로 실행할 수 있다면 알려 주시기 바랍니다.Nagios - Access Forbidden 403

Open Suse는 두 대의 다른 컴퓨터에 설치되어 있습니다. 하나는 VMware를 사용하고 다른 하나는 VirtualBox를 통해 하나의 응용 프로그램을 실행할 수 있습니다. 등 네트워크

에 액세스하는 그러나에 언급 한 바와 같이 오픈 수세 설치 단계를 수행 한 후 아무 문제 : http://nagios.sourceforge.net/docs/nagioscore/4/en/quickstart-opensuse.html

나는 "액세스 금지 403 오류!"찾을 나는 HTTP 제거 (로컬 호스트/Nagios를 시작할 때 messege를 :// 의도적으로 게시물에) 파이어 폭스에. 오류없이 설치가 완료되었습니다. 나는 OpenSuse 13.1 버전을 사용하고 있으며, 플러그인 2.0.2와 함께 4.0.6 및 4.0.7 버전의 nagios를 사용해 보았습니다.

apache (apache2), gcc, gcC++, kernel-source (사용자가 nagios 포럼에서 제안한), php, apache2-mod_php5, make 등이 모두 설치되었는지 확인했습니다. apache2 서비스가 실행 중이고 실행 후 retasrted되었습니다 : make install-webconf

사용자 이름과 비밀번호가 올바르게 입력되었습니다.

이 문제에 대해 저를 안내해주십시오. 여기

는 아파치/error_log에있다 : 여기

[Mon Jun 23 14:50:57.331306 2014] [autoindex:error] [pid 6138] [client 127.0.0.1:46061] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var) found, and server-generated directory index forbidden by Options directive 
[Mon Jun 23 14:51:57.317399 2014] [autoindex:error] [pid 6139] [client 127.0.0.1:46066] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var) found, and server-generated directory index forbidden by Options directive 
[Mon Jun 23 14:52:57.299316 2014] [autoindex:error] [pid 24637] [client 127.0.0.1:46068] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var) found, and server-generated directory index forbidden by Options directive 
[Mon Jun 23 14:57:57.289446 2014] [autoindex:error] [pid 6137] [client 127.0.0.1:46077] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var) found, and server-generated directory index forbidden by Options directive 
[Mon Jun 23 14:58:59.372027 2014] [autoindex:error] [pid 6136] [client ::1:59841] AH01276: Cannot serve directory /usr/local/nagios/share/: No matching DirectoryIndex (index.html,index.html.var) found, and server-generated directory index forbidden by Options directive 
[Mon Jun 23 15:02:57.274830 2014] [autoindex:error] [pid 6139] [client 127.0.0.1:46119] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var) found, and server-generated directory index forbidden by Options directive 
[Mon Jun 23 15:07:57.263871 2014] [autoindex:error] [pid 24637] [client 127.0.0.1:46143] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var) found, and server-generated directory index forbidden by Options directive 
[Mon Jun 23 15:12:57.251875 2014] [autoindex:error] [pid 6137] [client 127.0.0.1:46147] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var) found, and server-generated directory index forbidden by Options directive 
[Mon Jun 23 15:17:57.239626 2014] [autoindex:error] [pid 6135] [client 127.0.0.1:46152] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var) found, and server-generated directory index forbidden by Options directive 
[Mon Jun 23 15:22:57.228968 2014] [autoindex:error] [pid 6136] [client 127.0.0.1:46155] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var) found, and server-generated directory index forbidden by Options directive 
[Mon Jun 23 15:27:57.217628 2014] [autoindex:error] [pid 6138] [client 127.0.0.1:46158] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var) found, and server-generated directory index forbidden by Options directive 
[Mon Jun 23 15:32:57.206081 2014] [autoindex:error] [pid 6139] [client 127.0.0.1:46161] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var) found, and server-generated directory index forbidden by Options directive 
[Mon Jun 23 15:37:57.197239 2014] [autoindex:error] [pid 24637] [client 127.0.0.1:46165] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var) found, and server-generated directory index forbidden by Options directive 
[Mon Jun 23 15:42:57.180851 2014] [autoindex:error] [pid 6137] [client 127.0.0.1:46168] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var) found, and server-generated directory index forbidden by Options directive 
[Mon Jun 23 15:47:57.165708 2014] [autoindex:error] [pid 6135] [client 127.0.0.1:46172] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var) found, and server-generated directory index forbidden by Options directive 
[Mon Jun 23 15:52:57.154070 2014] [autoindex:error] [pid 6136] [client 127.0.0.1:46174] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var) found, and server-generated directory index forbidden by Options directive 
[Mon Jun 23 15:57:57.136265 2014] [autoindex:error] [pid 6138] [client 127.0.0.1:46182] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var) found, and server-generated directory index forbidden by Options directive 
[Mon Jun 23 16:02:57.122498 2014] [autoindex:error] [pid 6139] [client 127.0.0.1:46186] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var) found, and server-generated directory index forbidden by Options directive 
[Mon Jun 23 16:07:57.110446 2014] [autoindex:error] [pid 24637] [client 127.0.0.1:46191] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var) found, and server-generated directory index forbidden by Options directive 
[Mon Jun 23 16:12:57.092886 2014] [autoindex:error] [pid 6137] [client 127.0.0.1:46197] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var) found, and server-generated directory index forbidden by Options directive 
[Mon Jun 23 16:17:57.077070 2014] [autoindex:error] [pid 6135] [client 127.0.0.1:46204] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var) found, and server-generated directory index forbidden by Options directive 
[Mon Jun 23 16:22:57.067403 2014] [autoindex:error] [pid 6136] [client 127.0.0.1:46206] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var) found, and server-generated directory index forbidden by Options directive 
[Mon Jun 23 16:27:57.054625 2014] [autoindex:error] [pid 6138] [client 127.0.0.1:46209] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var) found, and server-generated directory index forbidden by Options directive 
[Mon Jun 23 16:32:57.042447 2014] [autoindex:error] [pid 6139] [client 127.0.0.1:46213] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var) found, and server-generated directory index forbidden by Options directive 
[Mon Jun 23 16:37:57.030372 2014] [autoindex:error] [pid 24637] [client 127.0.0.1:46219] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var) found, and server-generated directory index forbidden by Options directive 

는 아파치/acsess_log :

::1 - - [23/Jun/2014:14:58:59 -0700] "GET /nagios HTTP/1.1" 401 1233 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:25.0) Gecko/20100101 Firefox/25.0" 
::1 - nagiosadmin [23/Jun/2014:14:58:59 -0700] "GET /nagios HTTP/1.1" 301 310 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:25.0) Gecko/20100101 Firefox/25.0" 
::1 - - [23/Jun/2014:14:58:59 -0700] "GET /nagios/ HTTP/1.1" 403 1004 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:25.0) Gecko/20100101 Firefox/25.0" 
::1 - nagiosadmin [23/Jun/2014:15:01:43 -0700] "GET /nagios/index.php HTTP/1.1" 200 1628 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:25.0) Gecko/20100101 Firefox/25.0" 
127.0.0.1 - - [23/Jun/2014:15:02:57 -0700] "GET/HTTP/1.0" 403 1004 "-" "check_http/v2.0.2 (nagios-plugins 2.0.2)" 
127.0.0.1 - - [23/Jun/2014:15:07:57 -0700] "GET/HTTP/1.0" 403 1004 "-" "check_http/v2.0.2 (nagios-plugins 2.0.2)" 
127.0.0.1 - - [23/Jun/2014:15:12:57 -0700] "GET/HTTP/1.0" 403 1004 "-" "check_http/v2.0.2 (nagios-plugins 2.0.2)" 
127.0.0.1 - - [23/Jun/2014:15:17:57 -0700] "GET/HTTP/1.0" 403 1004 "-" "check_http/v2.0.2 (nagios-plugins 2.0.2)" 
127.0.0.1 - - [23/Jun/2014:15:22:57 -0700] "GET/HTTP/1.0" 403 1004 "-" "check_http/v2.0.2 (nagios-plugins 2.0.2)" 
127.0.0.1 - - [23/Jun/2014:15:27:57 -0700] "GET/HTTP/1.0" 403 1004 "-" "check_http/v2.0.2 (nagios-plugins 2.0.2)" 
127.0.0.1 - - [23/Jun/2014:15:32:57 -0700] "GET/HTTP/1.0" 403 1004 "-" "check_http/v2.0.2 (nagios-plugins 2.0.2)" 
127.0.0.1 - - [23/Jun/2014:15:37:57 -0700] "GET/HTTP/1.0" 403 1004 "-" "check_http/v2.0.2 (nagios-plugins 2.0.2)" 
127.0.0.1 - - [23/Jun/2014:15:42:57 -0700] "GET/HTTP/1.0" 403 1004 "-" "check_http/v2.0.2 (nagios-plugins 2.0.2)" 
127.0.0.1 - - [23/Jun/2014:15:47:57 -0700] "GET/HTTP/1.0" 403 1004 "-" "check_http/v2.0.2 (nagios-plugins 2.0.2)" 
127.0.0.1 - - [23/Jun/2014:15:52:57 -0700] "GET/HTTP/1.0" 403 1004 "-" "check_http/v2.0.2 (nagios-plugins 2.0.2)" 
127.0.0.1 - - [23/Jun/2014:15:57:57 -0700] "GET/HTTP/1.0" 403 1004 "-" "check_http/v2.0.2 (nagios-plugins 2.0.2)" 
127.0.0.1 - - [23/Jun/2014:16:02:57 -0700] "GET/HTTP/1.0" 403 1004 "-" "check_http/v2.0.2 (nagios-plugins 2.0.2)" 
127.0.0.1 - - [23/Jun/2014:16:07:57 -0700] "GET/HTTP/1.0" 403 1004 "-" "check_http/v2.0.2 (nagios-plugins 2.0.2)" 
127.0.0.1 - - [23/Jun/2014:16:12:57 -0700] "GET/HTTP/1.0" 403 1004 "-" "check_http/v2.0.2 (nagios-plugins 2.0.2)" 
127.0.0.1 - - [23/Jun/2014:16:17:57 -0700] "GET/HTTP/1.0" 403 1004 "-" "check_http/v2.0.2 (nagios-plugins 2.0.2)" 
127.0.0.1 - - [23/Jun/2014:16:22:57 -0700] "GET/HTTP/1.0" 403 1004 "-" "check_http/v2.0.2 (nagios-plugins 2.0.2)" 
127.0.0.1 - - [23/Jun/2014:16:27:57 -0700] "GET/HTTP/1.0" 403 1004 "-" "check_http/v2.0.2 (nagios-plugins 2.0.2)" 
127.0.0.1 - - [23/Jun/2014:16:32:57 -0700] "GET/HTTP/1.0" 403 1004 "-" "check_http/v2.0.2 (nagios-plugins 2.0.2)" 
127.0.0.1 - - [23/Jun/2014:16:37:57 -0700] "GET/HTTP/1.0" 403 1004 "-" "check_http/v2.0.2 (nagios-plugins 2.0.2)" 
127.0.0.1 - - [23/Jun/2014:16:42:57 -0700] "GET/HTTP/1.0" 403 1004 "-" "check_http/v2.0.2 (nagios-plugins 2.0.2)" 

conf의 파일은 다음과 같습니다

ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin" 

<Directory "/usr/local/nagios/sbin"> 
# SSLRequireSSL 
    Options ExecCGI 
    AllowOverride None 
    Order allow,deny 
    Allow from all 
# Order deny,allow 
# Deny from all 
# Allow from 127.0.0.1 
    AuthName "Nagios Access" 
    AuthType Basic 
    AuthUserFile /usr/local/nagios/etc/htpasswd.users 
    Require valid-user 
</Directory> 

Alias /nagios "/usr/local/nagios/share" 

<Directory "/usr/local/nagios/share"> 
# SSLRequireSSL 
    Options None 
    AllowOverride None 
    Order allow,deny 
    Allow from all 
# Order deny,allow 
# Deny from all 
# Allow from 127.0.0.1 
    AuthName "Nagios Access" 
    AuthType Basic 
    AuthUserFile /usr/local/nagios/etc/htpasswd.users 
    Require valid-user 
</Directory> 

답변

2

나는 이것이 정말 알고 오래된 스레드, 오늘 비슷한 문제가 있지만 Centos7의 경우,이 문제를 해결하기 위해 할 일은 index.php를 추가하는 것입니다. 오 DirectoryIndex에 매개 변수가 아닌이

httpd.conf 

은 라즈베리 파이에

난 그냥이 같은 문제로 실행
<IfModule dir_module> 
    DirectoryIndex index.html index.php 
    </IfModule> 
0

(에

<IfModule dir_module> 
    DirectoryIndex index.html 
    </IfModule> 

을 변경 오픈 수세의 경우에 유용 있는지 얼마나 3 w/Raspian Jessie, 설치 지침을 사용하여 http://www.howtovmlinux.com/articles/rasberry-pi/install-nagios-core-latest-version-4-x-x-on-raspberrypi-jessie.html) 나는 부끄러움을 당할 것입니다. 설치에서 중요한 단계를 건너 뛰었 기 때문입니다. 나는 "make install"을하지 않았습니다.

다른 사람이이 같은 골수 실수를 범하지는 않겠지 만 그럴 경우 다음과 같은 해결책이 있습니다. "make install"을 실행하십시오! : -]