Matthew Weier O'Phinney's Blog: Running mod_php and FastCGI side-by-side
Note: This article was originally published at PHPDeveloper on 10 August 2010.
I installed Zend Server some time ago, so I'm still on a PHP 5.2 mod_php binary. I have several PHP 5.3 binaries compiled and installed locally for running unit tests and sample scripts already -- so the question was how to keep my 5.2 mod_php running while simultaneously allowing the ability to run selected vhosts in 5.3? The answer can be summed up in one acronym: FastCGI.
He shows how to enable FastCGI in Apache (on Ubuntu), make a virtual host for your site and create a "cgi-bin" directory to contain the script(s) for your PHP versions as CGIs.