0

On Apache you could easily configure it through an htaccess file:

<IfModule mod_fcgid.c> Action php-fcgi /fcgi-bin/phpcgi-starter-5.3 </IfModule> <IfModule mod_fcgid.c> Action php-fcgi /fcgi-bin/phpcgi-starter-5.4 </IfModule> 

Is there something similar for Nginx + PHP-FPM?

1 Answer 1

0

Just run each version of php-fpm on a different port (or socket) and configure the appropriate port in your fastcgi_pass parameter in your nginx server block. For instance, you might have 5.3 run on port 9000 and 5.4 run on port 9001.

4
  • but how will php-fpm know which version of PHP to use? Commented Feb 24, 2013 at 22:36
  • You specify which one to connect to in your nginx configuration, exactly as I already said. Commented Feb 24, 2013 at 22:37
  • But how do I make 5.3 and 5.4 run on a specific port? Commented Feb 24, 2013 at 23:01
  • You edit the pool configuration and set the listen address appropriately. Commented Feb 24, 2013 at 23:10

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.