裝了最新版nagios(3.3.1),在裝得過程遇到如下問題:
1、nagios.conf的配置信息追加到httpd.conf
安裝nagios.conf時,會把文件放在/etc/httpd/conf.d,找半天都沒有在我red hat上找這個路徑,就自己mkdir了,安裝好nagios後,把nagios.conf的內容追加httpd.conf
2、You don’t have permission to access /nagios/ on this server
access_log:
10.13.115.1 - nagiosadmin [26/Jun/2011:13:01:10 +0800] "GET /nagios/side.php HTTP/1.1" 304 - 10.13.115.1 - nagiosadmin [26/Jun/2011:13:01:10 +0800] "GET /nagios/images/sblogo.png HTTP/1.1" 304 - 10.13.115.1 - nagiosadmin [26/Jun/2011:13:01:10 +0800] "GET /nagios/stylesheets/common.css HTTP/1.1" 304 - 10.13.115.1 - nagiosadmin [26/Jun/2011:13:01:10 +0800] "GET /nagios/images/greendot.gif HTTP/1.1" 304 -
error_log:
[notice] Apache/2.2.19 (Unix) DAV/2 configured -- resuming normal operations [error] [client xx.xx.115.1] Directory index forbidden by Options directive: /usr/local/nagios/share/ [error] [client xx.xx.115.1] Directory index forbidden by Options directive: /usr/local/nagios/share/ [error] [client xx.xx.115.1] Directory index forbidden by Options directive: /usr/local/nagios/share/ [error] [client xx.xx.115.1] Directory index forbidden by Options directive: /usr/local/nagios/share/ [error] [client xx.xx.115.1] Directory index forbidden by Options directive: /usr/local/nagios/share/
php頁面無法被apache解析???
解決:
在apache的配置文件httpd.conf修改
第一步:
<IfModule dir_module> DirectoryIndex index.html </IfModule>
改成
<IfModule dir_module> DirectoryIndex index.php index.html </IfModule>
第二步:
增加如下內容,記得裝php
LoadModule php5_module modules/libphp5.so AddType application/x-httpd-php .php .phtml AddType applicatoin/x-httpd-php-source .phps