How to use php7.0-fpm and php5.6-fpm concurrently on same server, but different vhosts?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








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.










share|improve this question



























    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.










    share|improve this question

























      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.










      share|improve this question















      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






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Feb 27 at 22:59









      Drakonoved

      7421515




      7421515










      asked Feb 27 at 22:46









      peppy

      63




      63

























          active

          oldest

          votes











          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "89"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          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



































          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          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













































































          Popular posts from this blog

          pylint3 and pip3 broken

          Missing snmpget and snmpwalk

          How to enroll fingerprints to Ubuntu 17.10 with VFS491