How to Install Multiple PHP Version with Apache on Ubuntu 18.04 & 16.04
Apache Installation Install Apache web server from the official repository. Launch terminal on your system or login with ssh for remote systems. Execute the following commands to install the latest available version of Apache web server. > sudo apt update > sudo apt install apache2 libapache2-mod-fastcgi //Ubuntu 18.04 Users: > sudo apt install apache2 libapache2-mod-fcgid PHP Installation For the installation of PHP versions, we use the PPA maintained here. Use the below couple of commands to add the PPA to your system. > sudo apt install python-software-properties > sudo add-apt-repository ppa:ondrej/php For this tutorial, we are using the PHP 5.6 and PHP 7.2 to configure with Apache web server. To use the multiple PHP versions, we will use PHP FPM and FastCGI. Let’s install the following packages on your system. > apt update > sudo apt install php5.6 php5.6-fpm > sudo apt install php7.2 php7.2-fpm After installation, php-fpm s...