使用Passenger和PHP应用程序运行Rails应用程序

tom*_*ave 5 php ruby apache ruby-on-rails passenger

我正在设置一个服务器,我需要运行Ruby On Rails 3应用程序以及一些PHP网站.该服务器是运行Apache 2.4.3的CentOS 5.8计算机.服务器用于测试和PRE生产,因此性能不是问题.

我正在为Rails应用程序使用Phusion Passenger,我创建了一堆虚拟主机(带有相关的文件夹和数据库帐户).然后,我打算将其他v-hosts用于PHP.

可能吗?我该怎么办?

非常感谢你


细节:
httpd.conf:

LoadModule passenger_module /app/auser/.rvm/gems/ruby-1.9.3-p286/gems/passenger-3.0.17/ext/apache2/mod_passenger.so  
PassengerRoot /app/auser/.rvm/gems/ruby-1.9.3-p286/gems/passenger-3.0.17  
PassengerRuby /app/auser/.rvm/wrappers/ruby-1.9.3-p286/ruby  
Run Code Online (Sandbox Code Playgroud)

(......)

##
## Virtual hosts
Include conf/extra/httpd-vhosts-phpmyadmin.conf
Include conf/extra/httpd-vhosts-rails01.conf
Include conf/extra/httpd-vhosts-rails02.conf
Include conf/extra/httpd-vhosts-php01.conf
Include conf/extra/httpd-vhosts-php02.conf
....
Run Code Online (Sandbox Code Playgroud)

乘客管理的v-hosts将如下:
包括conf/extra/httpd-vhosts-rails01.conf

<VirtualHost *:80>
   ServerName rails01.lcl
   DocumentRoot "/app/auser/apps/rails01/public"
   <Directory "/app/auser/apps/rails01/public">
      AllowOverride all
      Options -MultiViews
   </Directory>
</VirtualHost>
Run Code Online (Sandbox Code Playgroud)

基于PHP的v-hosts将如下:包括conf/extra/httpd-vhosts-php01.conf

<VirtualHost *:80>
    ServerName php01.lcl
    DocumentRoot "/app/auser/apps/php01/public"
    <Directory "/app/auser/apps/php01/public">
        Options FollowSymLinks MultiViews
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>
Run Code Online (Sandbox Code Playgroud)

sim*_*nke 3

是的,与 PHP 一起运行 Rack/Rails 肯定有效。