Problem with nagios and php

Good morning to all.

The first thing to tell you as I have the installation:

I have installed apache24, with php56 and its modules so that it recognizes php code.
Code:
pkg install mod_php56 php56-mysqli php56-xml php56-hash php56-gd php56-curl php56-tokenizer php56-zlib php56-zip
I have created an index.php file with phpinfo (); To check if it works properly, and it works(picture nagi12).
Then install nagios, copy the configuration files and check that there is no error with the command
Code:
nagios -v  /usr/local/etc/nagios/nagios.cfg
I create the password for nagios.
I add the following scrip to the apache configuration to add nagios:
Code:
ScriptAlias /nagios/cgi-bin/ /usr/local/www/nagios/cgi-bin/

Alias /nagios /usr/local/www/nagios/
<Directory /usr/local/www/nagios>

Options None

AllowOverride None

Order allow,deny

Allow from all

AuthName “Nagios Access”

AuthType Basic

AuthUSerFile /usr/local/etc/nagios/htpasswd.users

Require valid-user

</Directory>
<Directory /usr/local/www/nagios/cgi-bin>

Options ExecCGI

AllowOverride None

Order allow,deny

Allow from all

AuthName “Nagios Access”

AuthType Basic

AuthUSerFile /usr/local/etc/nagios/htpasswd.users

Require valid-user

</Directory>
Restart apache24 and I enter my nagios configuration window.
The problem is that when I click on server, it does not finish recognizing php, it comes out to download a file, instead of showing me the corresponding window.

The image nagi23 is what I see right after accessing nagios with username and password and nagi24 when I click on services.

After restarting apache this last time, I check that phpinfo () is still working and it is still working, but not nagios as they are seen in the images

Thank you in advance for your time
a greeting
 

Attachments

  • nagi12.png
    nagi12.png
    104.2 KB · Views: 364
  • nagi23.png
    nagi23.png
    79.7 KB · Views: 342
  • nagi24.png
    nagi24.png
    125.9 KB · Views: 390
Back
Top