We can make PHP 7 work in Apache2 through PHP-FPM and Apache's mod_fastcgi module which we install as follows: apt-get -y install libapache2-mod-fastcgi php7.0-fpm php7.0 PHP-FPM is a daemon process (with the systemd unit php7.0-fpm.service) that runs a FastCGI server on the socket /var/run/php/php7.0-fpm.sock. Next, enable the following Apache modules... a2enmod actions…