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

My current configuration is:

Apache2 + MPM-Worker AND FastCGI + PHP5-fpm (PHP 5.3.2) ON Ubuntu 10.04 LTS

I have a single pool of 2-5 processes running as a different user from that of the default www-data. FastCGI/PHP5-fpm is configured as an external server via FastCGIExternalServer

I know that I can setup multiple pools running as different users ...

But, I want to know if it is possible to use suEXEC in this type of setup? And, could it be setup with just a single pool? If so, how?

share|improve this question
up vote 1 down vote accepted

As of now, It is not possible to run a script as anything other than the user defined in the FPM pool.

You would need to setup a different pool and define the other user/group.

Is there some reason you can't or don't want to create separate pools?

EDIT: If you are worried about wasting idle resources, there is some talk about creating an "ondemand" feature for fpm-pools, that would essentially "fire up" the pool when it gets requests:

I highly recommend the highload-en php google group "...for discussing php, FastCGI, php-fpm and all technologies around for use in high loaded environments."

share|improve this answer

I think this is what you are looking for. BTW you don't need php-fpm with mod_fastcgi

And answer to your question is NO. You can't use your pool because it's already running and is running with certain user rights that couldn't be changed within FPM (by design). Just use approach I pointed to. Good luck

share|improve this answer
I think its worthy noting that php-fpm matures the mod_fastcgi implementation and is now included with PHP (for good reason). By not using FPM you are loosing out on quite a few improvements & bug fixes. The particular implementation you referenced is from 2005... That being said they are both tools in the toolbox, OP should use whichever best suits his needs...people are using both implementations in production with success. – iainlbc Mar 21 '11 at 21:27
But when you apache and it's suEXEC doesn't now nothing about FPM. You have to create pool for each user on your own. Then you don't need suEXEC at all. I think taht farinspace asks for single pool not only because of memory overhead or performance. – Dmytro Leonenko Mar 22 '11 at 8:50
I am trying to avoid the extra use of memory with many pools running at once. Is it possible to run the same php-cgi/suEXEC setup, but with php-fpm by tweaking the "daemonize" config? – farinspace Mar 24 '11 at 16:03
@farinspace I think you should post this to the highload-en php group as this is a pretty specialized question. I have not heard of anyone doing it yet and I follow the fpm community pretty closely. Pretty sure you're gonna need to drop FPM if you want the functionality you describe. Why fit a square peg into a round hole anyways...its going be a headache when you need to update – iainlbc Mar 24 '11 at 18:30

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.