Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

Background: 3 servers, 1 load balancer and 2 PHP app servers.

Do I need to install nginx on the 2 app servers? Or can I pass directly from the load balancer to PHP-FPM running on the app servers?

share|improve this question

Yes, you can. First you need to configure PHP-FPM to listen on an external IP instead of localhost, which is the default. Add/change the following in php-fpm.conf (on Ubuntu it's defined in /etc/php5/fpm/pool.d/www.conf):

listen = 9000

and restart PHP-FPM. Make sure that that port number is allowed by any firewalls between the load balancer and the app servers. The configure nginx to proxy to the app servers on that port number:

upstream php {

fastcgi_pass php;
share|improve this answer

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.