У меня была рабочая установка с PNP4Nagios и Nagios.Все было замечательно.
В пятницу я установил NagiosQL.
С тех пор веб-UI PNP4NAGIOS больше не работает!
Я получаю эту ошибку при попытке получить доступ к нему:
The requested URL /pnp4nagios/index.php/graph was not found on this server.
Mod_rewrite включен, но я предполагаю, что вышеупомянутая ошибка указывает, что не работает правильно??
Ссылки, сгенерированные Nagios (который раньше работал перед пятницей..) похожи на это:
http://srv-nagios/pnp4nagios/index.php/graph?host=win-server&srv=PING
Вот соответствующий вывод Apache error.log
:
[Fri Mar 02 15:06:43 2012] [error] [client 172.16.0.139] File does not exist: /usr/local/pnp4nagios/share/index.php/graph
Вот мой /etc/apache2/conf.d/pnp4nagios.conf
:
Alias /pnp4nagios "/usr/local/pnp4nagios/share"
<Directory "/usr/local/pnp4nagios/share">
AllowOverride None
Order allow,deny
Allow from all
#
# Use the same value as defined in nagios.conf
#
#AuthName "Nagios Access"
#AuthType Basic
#AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user
<IfModule mod_rewrite.c>
# Turn on URL rewriting
RewriteEngine On
Options FollowSymLinks
# Installation directory
RewriteBase /pnp4nagios/
# Protect application and system files from being viewed
RewriteRule ^(application|modules|system) - [F,L]
# Allow any files or directories that exist to be displayed directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Rewrite all other URLs to index.php/URL
RewriteRule .* index.php/$0 [PT,L]
</IfModule>
</Directory>
И мой /etc/apache2/sites-available/default
:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /usr/local/nagios/share/vshell
<Directory />
Options Indexes FollowSymLinks
AllowOverride None
Allow from all
AuthType Kerberos
AuthName "Nagios Authentification"
KrbMethodNegotiate On
KrbMethodK5Passwd On
KrbAuthRealms 1234.COM
Krb5KeyTab /etc/1234.keytab
require user xxx@1234.COM
require user yyy@1234.COM
require user aaa@1234.COM
require user bbb@1234.COM
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/local/nagios/sbin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>
Я действительно потерян здесь.
Ух ты!
Оказывается, ответ был действительно прост: S После всех этих дней пыток !!
Я нашел ответ здесь . [ 114]
Вот оно:
apt-get purge libapache2-mod-php5 php5 && apt-get install libapache2-mod-php5 php5
service apache2 restart
Это просто!