Creating Multiple Users on Single PHP-FPM Pool
- by Vince Kronlein
Have PHP-FPM/FastCGI up and running on my cPanel/WHM server but I'd like have it allow for multiple users off of a single pool.
Getting all vhosts to run off a single pool is simple by adding this to the Apache include editor under Global Post Vhost:
<IfModule mod_fastcgi.c>
FastCGIExternalServer /usr/local/sbin/php-fpm -host 127.0.0.1:9000
AddHandler php-fastcgi .php
Action php-fastcgi /usr/local/sbin/php-fpm.fcgi
ScriptAlias /usr/local/spin/php-fpm.fcgi /usr/local/sbin/php-fpm
<Directory /usr/local/sbin>
Options ExecCGI FollowSymLinks
SetHandler fastcgi-script
Order allow,deny
Allow from all
</Directory>
</IfModule>
But I'd like to find a way to implement php running under the user, but sharing the pool.
I manage and control all the domains that run under the pool so I'm not concerned about security of files per account, I just need to make sure all scripting can be executed by the user who owns the files, instead of needing to change file permissions for each account, or having to create tons of vhost include files.