Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I had a working setup with PNP4Nagios and Nagios. Everything was great.

Friday, I installed NagiosQL.

Since then, PNP4Nagios's web UI doesn't work anymore!

I get this error when trying to access it:

The requested URL /pnp4nagios/index.php/graph was not found on this server.

Mod_rewrite is enabled, but I guess the above error indicates that it's not working correctly??

The links generated by Nagios (that used to work, before Friday..) look like this:

http://srv-nagios/pnp4nagios/index.php/graph?host=win-server&srv=PING



Here is the relevant output of Apache's 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

Here is my /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>

And my /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>

I'm really lost here.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

Wow!!

It turns out that the answer was really simple :S After all these days of torture!!

I found the answer here.

Here it is:

apt-get purge libapache2-mod-php5 php5 && apt-get install libapache2-mod-php5 php5
service apache2 restart

That simple!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.