Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

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? –  Pineapple Under the Sea 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? –  Pineapple Under the Sea 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

 
discard

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.