2

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?

Googlebot
  • 1,047
  • 2
  • 15
  • 30
  • There is none, nginx is not designed for Shared hosting and it (most likely) never will be. – Martin Fjordvald Sep 27 '11 at 06: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. – Googlebot Sep 27 '11 at 08: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 09:33

1 Answers1

0

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.

petermolnar
  • 1,029
  • 1
  • 12
  • 17