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

I am trying to install PHP FPM on my CentOS 5.6 server, but I wasn't able to get it to work. After downloading PHP 5.3.20 from their, configuring it, making it and installing it, I got this message:

Installing PHP SAPI module:       fpm
Installing PHP CLI binary:        /usr/bin/
Installing PHP CLI man page:      /usr/share/man/man1/
Installing PHP FPM binary:        /usr/sbin/
Installing PHP FPM config:        /etc/
Installing PHP FPM man page:      /usr/share/man/man8/
Installing PHP FPM status page:      /usr/share/fpm/
Installing build environment:     /usr/lib/build/
Installing header files:          /usr/include/php/
Installing helper programs:       /usr/bin/
  program: phpize
  program: php-config
Installing man pages:             /usr/share/man/man1/
  page: phpize.1
  page: php-config.1

At that point, I assumed PHP was installed so I restarted Apache, but it was serving PHP files as plain text. How do I fix this? How do I get PHP FPM enabled on my CentOS 5.6 box?


share|improve this question
up vote 0 down vote accepted

You're looking for apache to act as a reverse proxy, using php-fpm as the backend application server.

  1. Ensure that php-fpm configured and running: service php-fpm restart and check logs for failure

  2. Ensure that somewhere in your apache config, you have loaded the correct proxying modules:

  3. Also, you need to include a proxypass directive so apache knows where to send the request for fulfillment.

Part of your apache config might look something like this, assuming php-fpm is running on port 9000:

LoadModule  proxy_module         modules/
LoadModule  proxy_fcgi_module    modules/
<VirtualHost *:80>
  ServerName    localhost
  DocumentRoot  "/var/www/html"
  ProxyPass     ProxyPass /myapp/ fcgi://localhost:9000

If this is not sufficient, update your question with more information about your apache config and you php-fpm config and exactly what commands you're running and the results you get.

share|improve this answer
Thanks I will give this a try. – cyphun Jan 16 '13 at 15:44

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.