

- #E PACKAGE APACHE2 HAS NO INSTALLATION CANDIDATE HOW TO#
- #E PACKAGE APACHE2 HAS NO INSTALLATION CANDIDATE INSTALL#
- #E PACKAGE APACHE2 HAS NO INSTALLATION CANDIDATE UPGRADE#
#E PACKAGE APACHE2 HAS NO INSTALLATION CANDIDATE UPGRADE#
#E PACKAGE APACHE2 HAS NO INSTALLATION CANDIDATE HOW TO#
You should also add how to undoing changes. This website is configured to work with PHP 5.6. Make sure to use correct ServerName and directory path according to your setup.

sudo vim /etc/apache2/sites-available/Īdd the following content. Create a file for the first virtual host and edit in your favorite text editor. Apache keeps all the VirtualHost configuration files under /etc/apache2/sites-available with the extension. Now, create and index.php containing the phpinfo() function. First, create two directories on your server. For the testing purpose, I am configuring two websites to work with two different-2 PHP versions. Get ready for the configuration of websites on your Apache server. Ubuntu 18.04 Users: sudo a2enmod actions fcgid alias proxy_fcgi sudo a2enmod actions fastcgi alias proxy_fcgi These modules are necessary to integrate PHP FPM and FastCGI with Apache server.

Now enable few modules required for the configuration of multiple PHP versions with Apache.
#E PACKAGE APACHE2 HAS NO INSTALLATION CANDIDATE INSTALL#
Let’s install the following packages on your system. To use the multiple PHP versions, we will use PHP FPM and FastCGI. # On Ubuntu 16.04 sudo apt install python-software-propertiesįor this tutorial, we are using the PHP 5.6 and PHP 7.2 to configure with Apache web server. # On Ubuntu 18.04 sudo apt install software-properties-common Use the below couple of commands to add the PPA to your system. Ubuntu 18.04 Users: sudo apt install apache2 libapache2-mod-fcgidįor the installation of PHP versions, we use the PPA maintained here. Sudo apt install apache2 libapache2-mod-fastcgi Execute the following commands to install the latest available version of Apache web server. Launch terminal on your system or login with ssh for remote systems. Install Apache web server from the official repository. You can also use more than two PHP versions with Apache as required but this tutorial covers two only. First VirtualHost will work with PHP 5.6 and another VirtualHost will run with PHP 7.2. This tutorial describes the installation and configuration of two VirtualHost on Apache with separate PHP versions. This tutorial will help you to install multiple PHP version with Apache on Ubuntu 18.04 and 16.04 system without switching PHP versions. But some of the system administrators are not aware of this. Also, most of you are aware of the configuration, I used in this tutorial. Some of the host managers are using Docker to run multiple PHP version on the single server. Generally, the hos manager used a separate server for each PHP version application deployment.
