1

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.

Vladislav Rastrusny
  • 2,581
  • 12
  • 39
  • 56

2 Answers2

6

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.

joschi
  • 20,747
  • 3
  • 46
  • 50
0

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

http://blog.myprod.net/2010/08/14/apache2-suexec-fastcgi-php-5-3-3-fpm-cache-opcode-apc/

FabD
  • 11