nagios安裝注意點

裝了最新版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
發佈了477 篇原創文章 · 獲贊 4 · 訪問量 2萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章