Expired ssl and bad gateway on reboot

someone stolen php7 from my server

apt update && apt-cache search php7
Hit http://ppa.launchpad.net trusty InRelease
Ign http://ppa.launchpad.net trusty InRelease                                  
Hit http://ppa.launchpad.net trusty InRelease                                  
Hit http://ppa.launchpad.net trusty/main amd64 Packages                        
Hit http://security.ubuntu.com trusty-security InRelease                       
Hit http://ppa.launchpad.net trusty/main Translation-en                        
Ign http://archive.ubuntu.com trusty InRelease                                 
Hit http://ppa.launchpad.net trusty Release.gpg                                
Hit http://ppa.launchpad.net trusty/main amd64 Packages                        
Hit http://security.ubuntu.com trusty-security/main Sources                    
Hit http://ppa.launchpad.net trusty/main Translation-en                        
Hit http://archive.ubuntu.com trusty-updates InRelease                         
Hit http://ppa.launchpad.net trusty Release                                    
Hit http://security.ubuntu.com trusty-security/universe Sources                
Hit http://ppa.launchpad.net trusty/main amd64 Packages                        
Hit http://archive.ubuntu.com trusty-backports InRelease                       
Hit http://ppa.launchpad.net trusty/main Translation-en                        
Hit http://security.ubuntu.com trusty-security/main amd64 Packages             
Hit http://archive.ubuntu.com trusty Release.gpg                    
Hit http://security.ubuntu.com trusty-security/universe amd64 Packages
Hit http://archive.ubuntu.com trusty-updates/main Sources           
Hit http://security.ubuntu.com trusty-security/main Translation-en 
Hit http://security.ubuntu.com trusty-security/universe Translation-en    
Hit http://archive.ubuntu.com trusty-updates/restricted Sources           
Hit http://archive.ubuntu.com trusty-updates/universe Sources
Hit http://archive.ubuntu.com trusty-updates/multiverse Sources
Hit http://archive.ubuntu.com trusty-updates/main amd64 Packages
Hit http://archive.ubuntu.com trusty-updates/restricted amd64 Packages
Hit http://archive.ubuntu.com trusty-updates/universe amd64 Packages
Hit http://archive.ubuntu.com trusty-updates/multiverse amd64 Packages
Hit http://archive.ubuntu.com trusty-updates/main Translation-en
Hit http://archive.ubuntu.com trusty-updates/multiverse Translation-en
Hit http://archive.ubuntu.com trusty-updates/restricted Translation-en
Hit http://archive.ubuntu.com trusty-updates/universe Translation-en
Hit http://archive.ubuntu.com trusty-backports/main Sources
Hit http://archive.ubuntu.com trusty-backports/restricted Sources
Hit http://archive.ubuntu.com trusty-backports/universe Sources
Hit http://archive.ubuntu.com trusty-backports/multiverse Sources
Hit http://archive.ubuntu.com trusty-backports/main amd64 Packages
Hit http://archive.ubuntu.com trusty-backports/restricted amd64 Packages
Hit http://archive.ubuntu.com trusty-backports/universe amd64 Packages
Hit http://archive.ubuntu.com trusty-backports/multiverse amd64 Packages
Hit http://archive.ubuntu.com trusty-backports/main Translation-en
Hit http://archive.ubuntu.com trusty-backports/multiverse Translation-en
Hit http://archive.ubuntu.com trusty-backports/restricted Translation-en
Hit http://archive.ubuntu.com trusty-backports/universe Translation-en
Hit http://archive.ubuntu.com trusty Release      
Hit http://archive.ubuntu.com trusty/main Sources
Hit http://archive.ubuntu.com trusty/restricted Sources
Hit http://archive.ubuntu.com trusty/universe Sources
Hit http://archive.ubuntu.com trusty/multiverse Sources
Hit http://archive.ubuntu.com trusty/main amd64 Packages
Hit http://archive.ubuntu.com trusty/restricted amd64 Packages
Hit http://archive.ubuntu.com trusty/universe amd64 Packages
Hit http://archive.ubuntu.com trusty/multiverse amd64 Packages
Hit http://archive.ubuntu.com trusty/main Translation-en
Hit http://archive.ubuntu.com trusty/main Translation-en_GB
Hit http://archive.ubuntu.com trusty/multiverse Translation-en
Hit http://archive.ubuntu.com trusty/multiverse Translation-en_GB
Hit http://archive.ubuntu.com trusty/restricted Translation-en
Hit http://archive.ubuntu.com trusty/restricted Translation-en_GB
Hit http://archive.ubuntu.com trusty/universe Translation-en
Hit http://archive.ubuntu.com trusty/universe Translation-en_GB
Ign http://archive.ubuntu.com trusty/main Translation-en_US                    
Ign http://archive.ubuntu.com trusty/multiverse Translation-en_US              
Ign http://archive.ubuntu.com trusty/restricted Translation-en_US              
Ign http://archive.ubuntu.com trusty/universe Translation-en_US                
Reading package lists... Done                                                  
root@box:/var/log# 


I believe that php7.0 has been replaced by php7.3 … @murgero is gonna be better at working through this one.

You may need to install Ubuntu’s ppa for obsoleted os versions.

1 Like

That’s why I had OP search for php7 instead of php7.0 cause the former includes 7.0,7.1/2/3/etc)

@debugger008 - Per https://www.digitalocean.com/community/tutorials/how-to-upgrade-to-php-7-on-ubuntu-14-04 you can get php7 back on there with:

sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo mailinabox

(Sudo might not be needed as root - but that will get you PHP 7.0 and 7.X)

EDIT: So why not move to 18.04? That really is the best option here…

I agree 100000% … OP, sadly it is time to move to Ubuntu 18. I suspect that you will spend much less time and effort on moving than you will on fixing the old. Who is your VPS provider?

seems that i cannot add this repository!

I’m trying but then i never got php7 as choice !

root@box:/var/log# sudo add-apt-repository ppa:ondrej/php
 Co-installable PHP versions: PHP 5.6, PHP 7.x and most requested extensions are included. Only Supported Versions of PHP (http://php.net/supported-versions.php) for Supported Ubuntu Releases (https://wiki.ubuntu.com/Releases) are provided. Don't ask for end-of-life PHP versions or Ubuntu release, they won't be provided.

Debian oldstable and stable packages are provided as well: https://deb.sury.org/#debian-dpa

You can get more information about the packages at https://deb.sury.org

BUGS&FEATURES: This PPA now has a issue tracker:
https://deb.sury.org/#bug-reporting

CAVEATS:
1. If you are using php-gearman, you need to add ppa:ondrej/pkg-gearman
2. If you are using apache2, you are advised to add ppa:ondrej/apache2
3. If you are using nginx, you are advise to add ppa:ondrej/nginx-mainline
   or ppa:ondrej/nginx

PLEASE READ: If you like my work and want to give me a little motivation, please consider donating regularly: https://donate.sury.org/

WARNING: add-apt-repository is broken with non-UTF-8 locales, see 
https://github.com/oerdnj/deb.sury.org/issues/56 for workaround:

# LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php
 More info: https://launchpad.net/~ondrej/+archive/ubuntu/php
Press [ENTER] to continue or ctrl-c to cancel adding it

gpg: keyring `/tmp/tmpk8cybiof/secring.gpg' created
gpg: keyring `/tmp/tmpk8cybiof/pubring.gpg' created
gpg: requesting key E5267A6C from hkp server keyserver.ubuntu.com
gpg: /tmp/tmpk8cybiof/trustdb.gpg: trustdb created
gpg: key E5267A6C: public key "Launchpad PPA for Ondřej Surý" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
OK
root@box:/var/log# sudo apt-get update
Ign http://archive.ubuntu.com trusty InRelease
Hit http://ppa.launchpad.net trusty InRelease                              
Hit http://archive.ubuntu.com trusty-updates InRelease                      
Hit http://archive.ubuntu.com trusty-backports InRelease                       
Ign http://ppa.launchpad.net trusty InRelease                                  
Hit http://archive.ubuntu.com trusty Release.gpg                               
Hit http://archive.ubuntu.com trusty-updates/main Sources                      
Hit http://ppa.launchpad.net trusty InRelease                                  
Hit http://archive.ubuntu.com trusty-updates/restricted Sources                
Hit http://archive.ubuntu.com trusty-updates/universe Sources                  
Hit http://security.ubuntu.com trusty-security InRelease                       
Hit http://ppa.launchpad.net trusty/main amd64 Packages                        
Hit http://archive.ubuntu.com trusty-updates/multiverse Sources                
Hit http://archive.ubuntu.com trusty-updates/main amd64 Packages               
Hit http://ppa.launchpad.net trusty/main Translation-en                        
Hit http://archive.ubuntu.com trusty-updates/restricted amd64 Packages         
Hit http://archive.ubuntu.com trusty-updates/universe amd64 Packages           
Hit http://ppa.launchpad.net trusty Release.gpg                                
Hit http://archive.ubuntu.com trusty-updates/multiverse amd64 Packages         
Hit http://archive.ubuntu.com trusty-updates/main Translation-en               
Hit http://security.ubuntu.com trusty-security/main Sources                    
Hit http://ppa.launchpad.net trusty/main amd64 Packages                        
Hit http://archive.ubuntu.com trusty-updates/multiverse Translation-en         
Hit http://archive.ubuntu.com trusty-updates/restricted Translation-en         
Hit http://ppa.launchpad.net trusty/main Translation-en                        
Hit http://archive.ubuntu.com trusty-updates/universe Translation-en           
Hit http://archive.ubuntu.com trusty-backports/main Sources                    
Hit http://security.ubuntu.com trusty-security/universe Sources                
Hit http://ppa.launchpad.net trusty Release                                    
Hit http://archive.ubuntu.com trusty-backports/restricted Sources              
Hit http://ppa.launchpad.net trusty/main amd64 Packages                        
Hit http://security.ubuntu.com trusty-security/main amd64 Packages        
Hit http://archive.ubuntu.com trusty-backports/universe Sources           
Hit http://ppa.launchpad.net trusty/main Translation-en                        
Hit http://archive.ubuntu.com trusty-backports/multiverse Sources              
Hit http://archive.ubuntu.com trusty-backports/main amd64 Packages        
Hit http://archive.ubuntu.com trusty-backports/restricted amd64 Packages  
Hit http://archive.ubuntu.com trusty-backports/universe amd64 Packages    
Hit http://security.ubuntu.com trusty-security/universe amd64 Packages    
Hit http://archive.ubuntu.com trusty-backports/multiverse amd64 Packages  
Hit http://archive.ubuntu.com trusty-backports/main Translation-en  
Hit http://archive.ubuntu.com trusty-backports/multiverse Translation-en
Hit http://archive.ubuntu.com trusty-backports/restricted Translation-en
Hit http://security.ubuntu.com trusty-security/main Translation-en  
Hit http://archive.ubuntu.com trusty-backports/universe Translation-en
Hit http://archive.ubuntu.com trusty Release                             
Hit http://archive.ubuntu.com trusty/main Sources                         
Hit http://archive.ubuntu.com trusty/restricted Sources                   
Hit http://security.ubuntu.com trusty-security/universe Translation-en    
Hit http://archive.ubuntu.com trusty/universe Sources                     
Hit http://archive.ubuntu.com trusty/multiverse Sources
Hit http://archive.ubuntu.com trusty/main amd64 Packages
Hit http://archive.ubuntu.com trusty/restricted amd64 Packages
Hit http://archive.ubuntu.com trusty/universe amd64 Packages
Hit http://archive.ubuntu.com trusty/multiverse amd64 Packages
Hit http://archive.ubuntu.com trusty/main Translation-en
Hit http://archive.ubuntu.com trusty/main Translation-en_GB
Hit http://archive.ubuntu.com trusty/multiverse Translation-en
Hit http://archive.ubuntu.com trusty/multiverse Translation-en_GB
Hit http://archive.ubuntu.com trusty/restricted Translation-en
Hit http://archive.ubuntu.com trusty/restricted Translation-en_GB
Hit http://archive.ubuntu.com trusty/universe Translation-en
Hit http://archive.ubuntu.com trusty/universe Translation-en_GB
Ign http://archive.ubuntu.com trusty/main Translation-en_US
Ign http://archive.ubuntu.com trusty/multiverse Translation-en_US
Ign http://archive.ubuntu.com trusty/restricted Translation-en_US
Ign http://archive.ubuntu.com trusty/universe Translation-en_US
Reading package lists... Done   
root@box:/var/log# apt-cache search php7
root@box:/var/log# 

migrating to 18.04 … creating another vps and migrating the current backup… uhm…

i cannot update the current server right ?

ovh

i guess i have no other choices right now… I’m just scared about migrating a lot of users

Try https://www.kimsufi.com/us/en/servers.xml (OVH partner) for cheap dedicated box. And migration is easy AFAIK:

https://mailinabox.email/maintenance.html#moving-boxes

@debugger008

Honestly, I would notify your users that you are going to do an upgrade and that email services will be unavailable for a short period of time during a set window.

The admin area is broken, but is /mail functioning ok (other than the expired SSL)?

Sometimes shit just has to go down for maintenance unexpectedly. :frowning:

1 Like

But restoring a backup would kind of make that moot, no? I mean if he was moving TO MiaB … /shrug

@debugger008

It looks like OVH allows snapshots … I would create a snapshot, and then restore the snapshot to a new VPS (temporarily).
After that, I would reinstall the OS on the original VPS to Ubuntu 18 and reinstall MiaB.
Then restore backups … in the end there will be nothing visible to the end user other than the short downtime.

1 Like

As long as he avoids moving the SSL folder, he is good. Restoring the backup to a VPS / Server running 18.04 is the best and quickest option to get him up 100%.

I would not do this bit, rather snapshot the old VPS and make a new one from scratch, then install MIAB on the new one. Move the data as required, then shutdown the old one. Make sure to change GLUE / HOSTNAME records @ registrar.

If money is an issue and a new VPS is out of the option, then doing @alento’s suggestion is the next best way. See if your OVH partner allows you to download the snapshot too, as a reload of the OS could wipe it out of existence.

You can upgrade from 14.04 → 16.04 → 18.04 BUT that will 100% of the time cause issues down the road, (since we skipped 16.04 compatibility.)

Uhmmm … that is what this is … the step I mentioned before that (restoring the snapshot to another vps) could be ignored though. In any case, why change hostname and glue … it can all be avoided. :slight_smile:

1 Like

(Unless the snapshot is of a data partition, restoring it to a new VPS will put ubuntu 14.04 on there :wink: )

Sorry for double post, on mobile and editing is a bitch.

Anyway, idk if his OVH hosting partner allows to put the old IP on a new VPS like Digital Ocean does, that’s why I mentioned it. (Some registrar’s refer to GLUE records as HOSTNAME records so I apologize about the confusing use of verbiage there.)

As I said, that step can be eliminated … it was just to protect a copy of the backups in case the backups didn’t restore or some other unforeseen situation came up. This would be very temporary as it would never be used in production - scrapped once the new MiaB under 18.04 is fully operational. Sometimes I can be too careful. :slight_smile:

1 Like

More backups > no backups at all. 100% agree, could honestly NEVER be too careful with digital data.

That is why I said to reinstall the OS on the original VPS after the snapshot was restored to a different vps. :stuck_out_tongue:

grrrr stop making so much damn sense @alento! >_<

LOL … :stuck_out_tongue: what can I say … I have screwed up enough times to know what not to do, lol.

1 Like