I am using Debian 8.7 and ISPConfig 3.1.2 I just followed the step by step guild on installing PHP7.1 and it all installed as shown on the instructions (the only additional thing I needed to do was run 'apt-get install pkg-config' - this was mentioned in the comments) https://www.howtoforge.com/tutorial/how-to-install-php-7-on-debian/ Once everything was set up I changed the PHP version on one of my sites and when the job had complete the certificate was no long valid. I checked the vhost file for the domain in /etc/apache2/sites-available and the :443 part was missing. I then unticked the Let's Encrypt box and saved then when this was complete I re-ticked the box and saved again and the domain was secure again. I tried the same on another domain and again the site's certificate became invalid but the :443 part did not vanish this time. I un-ticked the Let's Encrypt box, saved, waited, re-ticked etc and the certificate started to work again. Does the changing of PHP versions cause the certificate to be re-issued and I simply did not wait long enough for the site to re-validate its self?
I have this problem with about every change I make to the domain: the *:443 part is just missing in the vhost. I 'fix' this by making another change again. In most cases, just as yours, I have to untick/retick the SSL and LetsEncrypt boxes to have a working website (SSL only) again... So it seems to be a bug in ISPConfig vhost generation...