PassengerでRailsアプリをサブURIにデプロイしました。その手順を備忘として残しました。
●システムの環境
・Apache2.2
・Passenger3.0.19
・Ruby1.8.7
・Rails3.2.11
●Railsアプリのデプロイ構成
・Railsアプリのパス /home/rails/blog
・Apacheバーチャルホスト www.example.com
・バーチャルホストのドキュメントルート /var/www/html
・アクセスするURI http://example.com/rails
●アプリのpublicディレクトリに対しシンボリックリンクの設定
ln -s /home/rails/blog/public /var/www/html/rails
●Apacheバーチャルホスト設定
<VirtualHost www.example.com:80>
DocumentRoot /var/www/html
<Directory "/var/www/html">
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
RailsBaseURI /rails
<Directory "/var/www/html/rails">
Options -MultiViews FollowSymLinks
</Directory>
</VirtualHost>
一応、これでApacheからRailsアプリにアクセスできるように なりました。