RAILS_ROOT/public/ 以下に PHP スクリプトの入ったディレクトリを展開し、同じ public 直下の .htaccess に次のような設定を行います。
http://www.yohasebe.com/articles/2006/09/04/php%20within%20rails%20env
lighttpd + PHP + Ruby on Rails + MySQL
http://daufu.wordpress.com/2007/06/21/%E7%B6%B2%E9%A0%81%E4%BC%BA%E6%9C%8D%E5%99%A8%EF%BC%9Alighttpd-php-ruby-on-rails-mysql/
How TextDrive does both PHP and Rails FCGI in one thing-a-ma-bob
http://textsnippets.com/posts/show/299
fastcgi.server = (
".fcgi" =>
( "localhost" =>
(
"socket" => "/tmp/textdrive-new.socket",
"bin-path" => "/users/home/website/web/public/dispatch.fcgi",
"bin-environment" => ( "RAILS_ENV" => "production" )
)
),
".php" =>
( "localhost" =>
(
"socket" => "/tmp/textdrive-php5-fcgi.socket",
"bin-path" => "/usr/local/www/cgi-bin/php5-fcgi",
"bin-environment" => (
"PHP_FCGI_CHILDREN" => "4",
"PHP_FCGI_MAX_REQUESTS" => "5000"
)
)
)
)