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?

link|improve this question

There is none, nginx is not designed for Shared hosting and it (most likely) never will be. – Martin Fjordvald Sep 27 '11 at 6:12
In shared hosting we need to run hosts under different users (i.e. various clients). I am talking about a single server for a single admin. – Ali Sep 27 '11 at 8:31
Then I think you misunderstand how php-fpm works. You don't need a dedicated process to each host, you can fastcgi pass to the same host so long as you do not need user separation. – Martin Fjordvald Sep 27 '11 at 9:33
feedback

1 Answer

up vote 0 down vote accepted

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.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.