Page 1 of 1

Nagios is downloading .php files

Posted: Tue Jul 24, 2012 3:10 pm
by akegameesou
I have installed nagios3 on my Ubuntu 11.04 server using the command
apt-get install nagios3

My Server is running Fastcgi for PHP.

After install, in my browser when going to the URL http://IP_OF_Server/nagios3 and authentication with user nagiosadmin I am confronted with popup box to save or open the php file.

'which is a: application/x-httpd-php (1.4 KB)'

How can this be fixed?

Re: Nagios is downloading .php files

Posted: Tue Jul 24, 2012 4:20 pm
by nscott
I'm not an Ubuntu expert, but it sounds like Apache is not able to execute the PHP files and is instead trying to serve them. Here is a link to a thread on another forum with a similar issue:

http://ubuntuforums.org/showthread.php?t=890814

Hope this helps, if that thread doesn't help you, please let me know and we can go from there.

Re: Nagios is downloading .php files

Posted: Wed Aug 15, 2012 4:34 pm
by akegameesou
I have tried your suggestions but to no avail.

On our server we are using mod_fcgid (Mod is loaded), not mod_php5 (not loaded). It is setup this way to run a separate PHP instances each with their own php.ini config. So I assume the issue is that mod_php5 is not loaded. My question is, Will Nagios3 run under the mod_fcgid? If So is there some documentation you can point me to?

Thanks for your help in advance.
Ake

Re: Nagios is downloading .php files

Posted: Fri Aug 17, 2012 9:49 am
by agriffin
I don't know whether it will work under that setup, but I do know that mod_php5 is the most well-tested setup for Nagios. CGI probably works too, but as far as I know, FCGI does not actually spawn separate PHP instances unless you are using a wrapper like fcgiwrap along with it.

Unfortunately, there's no official documentation for alternative setups like this and I couldn't find any articles or blog posts from community members doing this either.

Re: Nagios is downloading .php files

Posted: Tue Aug 21, 2012 4:10 pm
by akegameesou
Thanks for your help I will post my outcomes if i get it working under fastCGI.