Answer the question
In order to leave comments, you need to log in
How to connect multiple versions of php to nginx using php-fpm?
One site requires PHP 5.2. Decided to do without Apache
Installed nginx, php-fpm on Debian Wheezy. Connected like this:
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
Answer the question
In order to leave comments, you need to log in
Install Docker with the required version of PHP inside, make php-fpm listen not to a unix socket, but to http (to be honest, it is possible to configure it with unix sockets, but it will definitely be easier), bind php-fpm from the container to the host port, change unix :/var/run/php5-fpm.sock on 127.0.0.1:port.
This will make it easier and more reliable.
Everything is quite simple, read the Docker documentation, you will understand without problems.
The author of the previous same question did not wait for an answer on a silver platter.
However, you might be lucky.
Try to look at the php-fpm start script. Might get you thinking.
So, it's easy. We collect a couple of php binaries with blackjack and cookies, put them somewhere, copy and edit the php-fpm start scripts, set everything up in the configs.
Crutches-crutches.
And no dockers.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question