I have digitalocean server and I manage it by laravel forge. The server configured with php7.3 an it is ok. I wanna use for some websites php5.6 and for some websites php7.3. So I want somehow switch php version in the nginx configuration.
location ~ .php$ {
fastcgi_split_path_info ^(.+.php)(/.+)$;
fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
I changed this line /var/run/php/php7.3-fpm.sock to
var/run/php/php5.6-fpm.sock but no luck./var/run/php directory in server contains php7.3-fpm.pid and
php7.3-fpm.sock.
and I think that php5.6 exists in the server because /etc/php/5.6 folder exitst in the server.
2
Answers
this answer helped me.
I installed php5.6 fpm to server
and in laravel forge I edited this line fastcgi_pass unix:/var/run/php/php7.3-fpm.sock; to fastcgi_pass unix:/var/run/php/php5.6-fpm.sock; in the website nginx configuration file.
SO phpinfo it changed to php5.6.
You need install php-5 on your webserver.
The link php ppa