I'm currently hosting sites for clients using the following setup:
- Apache 2.2.16
- mod_fastcgi 2.4.7
- php 5.3.3
Apache uses the worker MPM and serves PHP through a dynamic FastCGI config:
FastCgiSuexec /usr/sbin/suexec FastCgiConfig -singleThreshold 0 -pass-header Authorization -idle-timeout 3600 SuexecUserGroup user group Action application/x-httpd-fastphp /cgi-bin/php.fcgi AddType application/x-httpd-fastphp .php
This works well but this creates a php-cgi instance for each VirtualHost (even if the cgi-bin dir is physically the same for a given account) so if a client has a few subdomains it begins to add up, starving the server and trashing it.
So this brings me to the actual question, is it possible to serve all php requests for an account through a single php-cgi instance? Preferably while maintaining the suexec bit to prevent clients from reading files outside of their directory.