___  ___    _ _    _  _ _____   _____
 / __|/ _ \  | | |  | || |_ _\ \ / / __|
| (_ | (_) | |_  _| | __ || | \ V /| _|
 \___|\___/    |_|  |_||_|___| \_/ |___|

 --- A GOPHER-LIKE INTERFACE FOR HIVE BLOCKCHAIN ---

[Feature Request] Integrate possibility to have multiple PHP Versions for Apache

BY: @derwunner | CREATED: July 10, 2018, 8:56 p.m. | VOTES: 6 | PAYOUT: $0.11 | [ VOTE ]

GitHub Issue

https://github.com/laravel/homestead/issues/892

In the Vagrant Homestead box, it's possible to have different php versions when using nginx as the web server. They offer also apache web server. But inside apache, it's not possible for now.

Indeed, they have the most dependencies included (PHP-FPM) to get multiple php version also for apache.
The basic handlers could be added to /etc/apache2/sites-enabled/000-default.conf like this:


  AddHandler php56-fcgi-www .php
  Action php56-fcgi-www /php56-fcgi-www
  Alias /php56-fcgi-www /usr/lib/cgi-bin/php56-fcgi-www
  FastCgiExternalServer /usr/lib/cgi-bin/php56-fcgi-www -socket /run/php/php5.6-fpm.sock -pass-header Authorization


     Require all granted




   AddHandler php70-fcgi-www .php
   Action php70-fcgi-www /php70-fcgi-www
   Alias /php70-fcgi-www /usr/lib/cgi-bin/php70-fcgi-www
   FastCgiExternalServer /usr/lib/cgi-bin/php70-fcgi-www -socket /run/php/php7.0-fpm.sock -pass-header Authorization


      Require all granted





      SetHandler php70-fcgi-www


And the php version / the handler could be set to each vhost by adding this line to the vhost config:

SetHandler php70-fcgi-www

All they need to do is to install fastcgi:

apt-get install libapache2-mod-fastcgi

Source

https://www.thomaschristlieb.de/mehrere-php-versionen-auf-einem-linux-server-mit-php-fpm/

TAGS: [ #utopian-io ] [ #suggestions ] [ #dev ] [ #php ] [ #busy ]

Replies

@gaman | July 10, 2018, 11:42 p.m. | Votes: 0 | [ VOTE ]

Resteemed your article. This article was resteemed because you are part of the New Steemians project. You can learn more about it here: https://steemit.com/introduceyourself/@gaman/new-steemians-project-launch

@minnowsupport | July 11, 2018, 6:10 a.m. | Votes: 0 | [ VOTE ]

Congratulations! This post has been upvoted from the communal account, @minnowsupport, by derwunner from the Minnow Support Project. It's a witness project run by aggroed, ausbitbank, teamsteem, theprophet0, someguy123, neoxian, followbtcnews, and netuoso. The goal is to help Steemit grow by supporting Minnows. Please find us at the Peace, Abundance, and Liberty Network (PALnet) Discord Channel. It's a completely public and open space to all members of the Steemit community who voluntarily choose to be there.
If you would like to delegate to the Minnow Support Project you can do so by clicking on the following links: 50SP, 100SP, 250SP, 500SP, 1000SP, 5000SP. Be sure to leave at least 50SP undelegated on your account.

@knowledges | July 15, 2018, 11:07 p.m. | Votes: 2 | [ VOTE ]

Hello @derwunner! Thank you for using Utopian to submit your suggestion. Unfortunately, Its a duplicate of issue 892. You are strongly advised to check for a duplicate before submitting via Utopian.

Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]

[ BACK TO TRENDING ] [ BACK TO MENU ]
CMD>