Page 1 of 1

Nagios website broken after Ubuntu dist upgarde

Posted: Wed Nov 06, 2019 5:01 am
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.

Re: Nagios website broken after Ubuntu dist upgarde

Posted: Wed Nov 06, 2019 12:49 pm
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

Re: Nagios website broken after Ubuntu dist upgarde

Posted: Thu Nov 07, 2019 6:10 am
by ThomasC.
Thank you Scott That fixed th eissue for me

Re: Nagios website broken after Ubuntu dist upgarde

Posted: Thu Nov 07, 2019 6:57 am
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

Re: Nagios website broken after Ubuntu dist upgarde

Posted: Thu Nov 07, 2019 7:08 am
by ThomasC.
Nevermind, I think I had to run this to get it to work:

a2enmod php7.2

Re: Nagios website broken after Ubuntu dist upgarde

Posted: Thu Nov 07, 2019 7:36 am
by scottwilkerson
ThomasC. wrote:Nevermind, I think I had to run this to get it to work:

a2enmod php7.2
Great!

Locking thread