Create a server example.com
Create a sub-server foo.example.com
Create a sub-server foo2.example.com
Create a sub-server foo3.example.com
You now have 4 sub-servers using their own PHP processes. Apart from this being a waste of resources (they could all instead use example.com's FastCGI daemon since they all run as the same unix user anyway), there's also a bug.
Session variables cannot be written to disk by any of the sub-server daemons. Only the top-level daemon can do it.
My solution to all of this resource bloat is just to disable the Bootup actions for all of the extra daemons for the server, and modifying the NGINX .conf files to point each sub-domain to the main-domain's FastCGI instance. This is the best solution unless the subdomains are high load and would benefit from running their own FastCGI processes.
- Bug in suexec permissions for subserver FastCGI processes, prevents storing sessions to disk
- Resource bloat by starting 5 new PHP processes per subdomain even though they could be using the parent-domain's processes instead. (Maybe add a "Re-use parent's FastCGI process" checkbox on sub-server creation.)