Nagios website broken after Ubuntu dist upgarde

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
ThomasC.
Posts: 6
Joined: Mon Sep 19, 2016 8:34 am

Nagios website broken after Ubuntu dist upgarde

Post by ThomasC. »

Just did a dist-upgrade on my Ubuntu Nagios server from Ubuntu 14 to 16.04.06 LTS

Now the website is broken

Image

Can someone please help I don't know where to look.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios website broken after Ubuntu dist upgarde

Post by scottwilkerson »

Did php get uninstalled?

Code: Select all

sudo apt-get install -y apache2 php libapache2-mod-php7.0 libgd2-xpm-dev

Code: Select all

sudo a2enmod rewrite
sudo a2enmod cgi
systemctl restart apache2
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
ThomasC.
Posts: 6
Joined: Mon Sep 19, 2016 8:34 am

Re: Nagios website broken after Ubuntu dist upgarde

Post by ThomasC. »

Thank you Scott That fixed th eissue for me
ThomasC.
Posts: 6
Joined: Mon Sep 19, 2016 8:34 am

Re: Nagios website broken after Ubuntu dist upgarde

Post by ThomasC. »

So I updated succesfully to 16.04 and tried the upgrade to 18.04
Now I am getting a different page:

Image

I tried to run the same commands as before

Code: Select all

root@remcorpnag01:~# apt-get install -y apache2 php libapache2-mod-php
Reading package lists... Done
Building dependency tree
Reading state information... Done
php is already the newest version (1:7.2+60ubuntu1).
apache2 is already the newest version (2.4.29-1ubuntu4.11).
The following packages were automatically installed and are no longer required:
  libcurses-perl libcurses-ui-perl libterm-readkey-perl linux-headers-3.13.0-37 linux-headers-3.13.0-37-generic linux-image-3.13.0-37-generic linux-image-extra-3.13.0-37-generic
Use 'apt autoremove' to remove them.
The following NEW packages will be installed:
  libapache2-mod-php
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 3,212 B of archives.
After this operation, 16.4 kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 libapache2-mod-php all 1:7.2+60ubuntu1 [3,212 B]
Fetched 3,212 B in 0s (16.6 kB/s)
Selecting previously unselected package libapache2-mod-php.
(Reading database ... 124596 files and directories currently installed.)
Preparing to unpack .../libapache2-mod-php_1%3a7.2+60ubuntu1_all.deb ...
Unpacking libapache2-mod-php (1:7.2+60ubuntu1) ...
Setting up libapache2-mod-php (1:7.2+60ubuntu1) ...
root@remcorpnag01:~# apt-get install -y libgd2-xpm-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libgd2-xpm-dev is already the newest version (2.1.0-3ubuntu0.11).
The following packages were automatically installed and are no longer required:
  libcurses-perl libcurses-ui-perl libterm-readkey-perl linux-headers-3.13.0-37 linux-headers-3.13.0-37-generic linux-image-3.13.0-37-generic linux-image-extra-3.13.0-37-generic
Use 'apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@remcorpnag01:~# apt-get install -y apache2
Reading package lists... Done
Building dependency tree
Reading state information... Done
apache2 is already the newest version (2.4.29-1ubuntu4.11).
The following packages were automatically installed and are no longer required:
  libcurses-perl libcurses-ui-perl libterm-readkey-perl linux-headers-3.13.0-37 linux-headers-3.13.0-37-generic linux-image-3.13.0-37-generic linux-image-extra-3.13.0-37-generic
Use 'apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@remcorpnag01:~# a2enmod rewrite
Module rewrite already enabled
root@remcorpnag01:~# a2enmod cgi
Module cgi already enabled
root@remcorpnag01:~# systemctl restart apache2
ThomasC.
Posts: 6
Joined: Mon Sep 19, 2016 8:34 am

Re: Nagios website broken after Ubuntu dist upgarde

Post by ThomasC. »

Nevermind, I think I had to run this to get it to work:

a2enmod php7.2
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios website broken after Ubuntu dist upgarde

Post by scottwilkerson »

ThomasC. wrote:Nevermind, I think I had to run this to get it to work:

a2enmod php7.2
Great!

Locking thread
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked