[Feature Request] Integrate possibility to have multiple PHP Versions for Apache
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:
<IfModule mod_fastcgi.c>
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
<Directory "/usr/lib/cgi-bin">
Require all granted
</Directory>
</IfModule>
<IfModule mod_fastcgi.c>
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
<Directory "/usr/lib/cgi-bin">
Require all granted
</Directory>
</IfModule>
<IfModule mod_fastcgi.c>
<FilesMatch ".+\.ph(p[345]?|t|tml)$">
SetHandler php70-fcgi-www
</FilesMatch>
</IfModule>
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/
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]
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
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.