Vlad Miller
Vlad Miller

Reputation: 2280

Nginx + apache or nginx + php-frm

I'm developing a big project now and I'm thinking about using nginx with php-fpm instead of nginx with apache and mod_php.

My concern is why this setup is not popular? Why does everybody use nginx + apache? Is there an issue?

Upvotes: 0

Views: 883

Answers (2)

Michel Feldheim
Michel Feldheim

Reputation: 18260

A lot of people just added nginx in front if their existing LAMP stack to increase throughput with small efforts. Those people mostly use nginx as caching proxy which maybe additionally delivers static files from local disc directly rather than passing those requests through the heavy apache-mod_php stack.

The LAMP stack is approved, well known and very well tested, while php-fpm is a quite young project which just recently was integrated into the official PHP source.

I am running a nginx - php-fpm stack successfully on several high-traffic sites now and I don't want to miss the simple, clean, yet function-rich combination any more.

If you're familiar with fastcgi you'll quickly get into php-fpm as well. Working default configs and init scripts are now included in every Linux distro package I know, so setting this up is no longer something you need to worry about.

Upvotes: 1

MTeck
MTeck

Reputation: 1688

Many people perceive Apache to be easier because they already know it. However, since php-fpm came out this has been decreasingly the case. The entire Nginx community recommends using php-fpm and, in general, ditching Apache. It gives you significantly more control as well.

You're statement that everyone uses Apache behind Nginx is a naive one, and false as well.

Upvotes: 2

Related Questions