php fastcgi support - how do u do it?

mike mike503 at
Tue Jul 15 23:58:36 MSD 2008

On 7/15/08, Marcos Neves <marcos.neves at> wrote:
> For a shared hosting, what are the advantages of php-fpm over mod_php?

You can setup a separate fastcgi pool for each user. That way if their
scripts get exploited, the only files they'll be able to mess with are
that user.

No more "www-data" or the webserver user owning every uploaded file on
the system.

Also, you'll be using FastCGI, not mod_php, which is tied in to the
webserver. From the looks of it, based on Lighty, nginx, Zeus, etc...
most people consider FastCGI the better method, since it does not tie
up the webserver threads/processes/whatever with processing PHP. It
should be more scalable. I think Litespeed's mod_php might work well
too, but again - unless you can define a different uid/gid for each
vhost and configure suEXEC how you want, different FastCGI pools is
still the way to go.

I'd say php-fpm is even more useful for shared hosting since you can
easily define multiple pools (one for each user for instance) - that's
how I use it right now. The other key benefit (apache-style process
spawning) is coming soon, not quite finished yet. Between both of
those, that takes care of my two key desires.

More information about the nginx mailing list