Nginx + Php-fpm
Nginx is a small, lightweight web server and reverse proxy and is well-suited to a high traffic site. Compared to Apache, means an Nginx server can run in a much smaller memory footprint.
PHP-FPM is a daemon that spawns processes to manage your online applications. So, rather than have your web server running plugins to display and process your PHP code, your PHP code is now run natively, by PHP-FPM.
For high concurrency you have a few options, in order of my preference.
1) Nginx + PHP-FPM + APC. Easiest to setup if your script doesn't need mod_rewrite. However, I noticed that PHP-FPM sometimes fails to start when the process is restarted. Rarely, but it happens.
2) Apache mpm-worker/event + mod_fastcgi externalserver to PHP-FPM + APC.
3) Nginx for static files, and proxy back to Apache + mod_php + APC.
4) Apache mpm-worker/event + mod_fastcgi (not mod_fcgid) to PHP-CGI. Run a single fastcgi process and put APC on. For some reason however, I can't get Debian packaged mod_fastcgi to work for this setup. I think the module is no longer maintained so its "buggy" with Apache 2.x
I would stay far far away from Apache + mod_php. It may be the fastest to serve content but its also the fastest way to OOM wreck your server.
Last edited by Scientist; 03-21-2011 at 11:16 AM.
Tuxlite.com Complete LAMP and LNMP script for Debian and Ubuntu.