Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|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. –  All 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

1 Answer 1

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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