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

I wonder if there is a good guide on how to setup Apache + SuExec + php-fpm? I have a server which I am going to use several separate website. So, I need php to be run as site-owner user. As I can see, php-fpm is a little different from php-fcgi. Is there a need in mod_fcgid from Apache in this case? How to set this all up?

For now my site is running Apache + mod_suphp + php-cgi, so... it's good, but a little slow. I want to preserve security and gain an ability to use APC.

share|improve this question
up vote 6 down vote accepted

PHP-FPM is a patch for PHP to provide some advanced process management features which are useful when used in its FastCGI variant. On a side note, PHP 5.4 will probably include PHP-FPM out of the box (according to Antony Dovgal).

Since mod_fcgid doesn't support externally spawned FastCGI servers, you need to use mod_fastcgi or mod_proxy_fcgi.

Google found this two-part tutorial (Part 1, Part 2) which describes the configuration of Apache httpd, suEXEC, mod_fastcgi, PHP-FPM and APC. I haven't tried the tutorial but it should give you an idea of how to configure it.

share|improve this answer
-1 ... The links provided for the alleged two-part tutorial return 404. – Smuuf Jan 18 at 12:58

This tutorial explain how to set up PHP-FPM (bundle with PHP 5.3.3) with Apache2 :

share|improve this answer
2 French... – Refineo Oct 11 '11 at 19:37

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.