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

前端之家收集整理的这篇文章主要介绍了使用Passenger和PHP应用程序运行Rails应用程序前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在设置一个服务器,我需要运行 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

(……)

##
## 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
....

乘客管理的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>

基于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>
是的,与PHP一起运行Rack / Rails肯定有效.

猜你在找的PHP相关文章