What is Apache's mod_php equivalent in Nginx? I have Nginx with php-fpm. Everything is perfect but the problem is that it works like fcgi in Apache not mod_php. This means that a task is added for every host I add. I have 50 hosts with few static pages and negligible traffic, but I have a php5-fpm task for each which uses about 25M of RAM. Thus, I have 2 running task and 50+ sleeping tasks using 1GB of RAM.
fcgi is useful for security reason as each host has its own task; but in a server with single user, mod_php saves RAM as all tasks are running under apache user. How can I do this Nginx?
You can run php-fpm pools with different user rights, and proxy fastcgi requests to each pool depending on the domain.
There was a tutorial about this a few weeks ago at howtoforge.com, I hope it helps.