How to use php7.0-fpm and php5.6-fpm concurrently on same server, but different vhosts?
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO9GURib1T8z7lCwjOGLQaGtrueEthgQ8LO42ZX8cOfTqDK4jvDDpKkLFwf2J49kYCMNW7d4ABih_XCb_2UXdq5fPJDkoyg7-8g_YfRUot-XnaXkNYycsNp7lA5_TW9td0FFpLQ2APzKcZ/s1600/1.jpg)
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYQ0N5W1qAOxLP7t7iOM6O6AzbZnkXUy16s7P_CWfOb5UbTQY_aDsc727chyphenhyphen5W4IppVNernMMQeaUFTB_rFzAd95_CDt-tnwN-nBx6JyUp2duGjPaL5-VgNO41AVsA_vu30EJcipdDG409/s400/Clash+Royale+CLAN+TAG%2523URR8PPP.png)
up vote
1
down vote
favorite
I am using Ubuntu 16.04 and Apache 2.4.29
I used a guide to install php7.0-fpm and get my server set up on HTTP/2:
How to Enable HTTP/2 in Apache 2.4 on Ubuntu 16.04
These are the changes made based on the guide:
sudo add-apt-repository ppa:ondrej/apache2
sudo apt update
sudo apt upgrade
sudo apt install php7.0-fpm
sudo a2enmod proxy_fcgi setenvif
sudo a2enconf php7.0-fpm
sudo a2dismod php7.0
sudo service apache2 restart
sudo a2dismod mpm_prefork
sudo a2enmod mpm_event
sudo service apache2 restart
sudo service php7.0-fpm restart
However, I have one old site that is not compatible with php7.0. Instead, I need just this one site to run on php 5.6. I tried installing and enabling php5.6-fpm based on various guides on the internet, but can't get it working.
I would like to install php5.6-fpm (or whatever 5.6 version works), and add a few lines to the Virtual Host file or .htaccess (whichever is easiest), and have just this one site work with php5.6-fpm without a huge overhaul project. At the same time, I don't want to change or mess up anything with my php7.0 sites.
16.04 apache2 php
add a comment |Â
up vote
1
down vote
favorite
I am using Ubuntu 16.04 and Apache 2.4.29
I used a guide to install php7.0-fpm and get my server set up on HTTP/2:
How to Enable HTTP/2 in Apache 2.4 on Ubuntu 16.04
These are the changes made based on the guide:
sudo add-apt-repository ppa:ondrej/apache2
sudo apt update
sudo apt upgrade
sudo apt install php7.0-fpm
sudo a2enmod proxy_fcgi setenvif
sudo a2enconf php7.0-fpm
sudo a2dismod php7.0
sudo service apache2 restart
sudo a2dismod mpm_prefork
sudo a2enmod mpm_event
sudo service apache2 restart
sudo service php7.0-fpm restart
However, I have one old site that is not compatible with php7.0. Instead, I need just this one site to run on php 5.6. I tried installing and enabling php5.6-fpm based on various guides on the internet, but can't get it working.
I would like to install php5.6-fpm (or whatever 5.6 version works), and add a few lines to the Virtual Host file or .htaccess (whichever is easiest), and have just this one site work with php5.6-fpm without a huge overhaul project. At the same time, I don't want to change or mess up anything with my php7.0 sites.
16.04 apache2 php
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I am using Ubuntu 16.04 and Apache 2.4.29
I used a guide to install php7.0-fpm and get my server set up on HTTP/2:
How to Enable HTTP/2 in Apache 2.4 on Ubuntu 16.04
These are the changes made based on the guide:
sudo add-apt-repository ppa:ondrej/apache2
sudo apt update
sudo apt upgrade
sudo apt install php7.0-fpm
sudo a2enmod proxy_fcgi setenvif
sudo a2enconf php7.0-fpm
sudo a2dismod php7.0
sudo service apache2 restart
sudo a2dismod mpm_prefork
sudo a2enmod mpm_event
sudo service apache2 restart
sudo service php7.0-fpm restart
However, I have one old site that is not compatible with php7.0. Instead, I need just this one site to run on php 5.6. I tried installing and enabling php5.6-fpm based on various guides on the internet, but can't get it working.
I would like to install php5.6-fpm (or whatever 5.6 version works), and add a few lines to the Virtual Host file or .htaccess (whichever is easiest), and have just this one site work with php5.6-fpm without a huge overhaul project. At the same time, I don't want to change or mess up anything with my php7.0 sites.
16.04 apache2 php
I am using Ubuntu 16.04 and Apache 2.4.29
I used a guide to install php7.0-fpm and get my server set up on HTTP/2:
How to Enable HTTP/2 in Apache 2.4 on Ubuntu 16.04
These are the changes made based on the guide:
sudo add-apt-repository ppa:ondrej/apache2
sudo apt update
sudo apt upgrade
sudo apt install php7.0-fpm
sudo a2enmod proxy_fcgi setenvif
sudo a2enconf php7.0-fpm
sudo a2dismod php7.0
sudo service apache2 restart
sudo a2dismod mpm_prefork
sudo a2enmod mpm_event
sudo service apache2 restart
sudo service php7.0-fpm restart
However, I have one old site that is not compatible with php7.0. Instead, I need just this one site to run on php 5.6. I tried installing and enabling php5.6-fpm based on various guides on the internet, but can't get it working.
I would like to install php5.6-fpm (or whatever 5.6 version works), and add a few lines to the Virtual Host file or .htaccess (whichever is easiest), and have just this one site work with php5.6-fpm without a huge overhaul project. At the same time, I don't want to change or mess up anything with my php7.0 sites.
16.04 apache2 php
16.04 apache2 php
edited Feb 27 at 22:59
Drakonoved
7421515
7421515
asked Feb 27 at 22:46
peppy
63
63
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1010437%2fhow-to-use-php7-0-fpm-and-php5-6-fpm-concurrently-on-same-server-but-different%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password