Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 mod_fcgid.c>
Action    php-fcgi    /fcgi-bin/phpcgi-starter-5.4

Is there something similar for Nginx + PHP-FPM?

share|improve this question

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.

share|improve this answer
but how will php-fpm know which version of PHP to use? – Michelle Feb 24 '13 at 22:36
You specify which one to connect to in your nginx configuration, exactly as I already said. – Michael Hampton Feb 24 '13 at 22:37
But how do I make 5.3 and 5.4 run on a specific port? – Michelle Feb 24 '13 at 23:01
You edit the pool configuration and set the listen address appropriately. – Michael Hampton Feb 24 '13 at 23:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.