oliver wrote:
Actually, some people like the nginx+apache setup.
They use nginx for all the static content and reverse proxy php pages to apache+mod_php installation.
apache+mod_php is more stable than fcgi, you don't necessarily need to modify your existing config and i think mod_php offers some features that fcgi doesn't (need to dbl-check that).
Might make sense if your site is heavy on static content and you already have a working configuration that you want to migrate without much hassle.
Apache + nginx/lighttpd/lightspeed can be more efficient memory-wise when compared to Apache, but nginx/lighttpd/lightspeed alone would always be more memory efficient than both at the same time.
I'm not aware of any stability issues with fastcgi-based dynamic content, and lighttpd is more memory efficient than apache+mod_php. With apache+mod_php, every single Apache process gets PHP built-in whether it needs it or not. With lighttpd+fastcgi, your main lighttpd process remains PHP-free, handling static content, while you have a configurable number of dedicated PHP processes that you can tailor to suit your load requirements without impacting the memory footprint of static content.
For example, our setup has both PHP and Perl loaded via fastcgi into lighttpd, but our Perl load is way lighter than our PHP load. As such, we've got 6 PHP processes and 2 Perl processes. I believe if you had both PHP and Perl loaded in Apache, you'd have BOTH PHP and Perl in *every* single Apache process even if they were serving static content!