Multiple php versions in Laravel Forge at the same time
I have several laravel apps that use different PHP versions (7.0, 7.1, 7.3, 7.4). Dependencies depend on those versions, and I don't have the opportunity to upgrade them. How can I install all needed PHP versions without breaking any default laravel forge configurations and functionality?
Answer
Solution:
yes you can, just change fastcgi_pass to the php-fpm version you want to use.
e.g.
/etc/nginx/sites-available/yoursite.com
location ~ \.php$ {
...
fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
}
I also recommend changing your deployment hooks if you use any to use the same php.
php7.3 artisan route:cache
Source