走行轨与乘客一起PHP应用程序 [英] Running Rails applications with Passenger alongside PHP applications
问题描述
我设置一台服务器,我将需要运行Ruby on Rails的一些PHP网站以及3应用程序。
该服务器是一台CentOS 5.8的机器运行Apache 2.4.3。
该服务器是用于测试和$ P $对生产,所以性能不成问题。
我使用的Phusion客运的Rails应用,我已经创建了一堆虚拟主机(有相关的文件夹和数据库帐户)。
然后,我打算用其他的V主机的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
(...)
##
##虚拟主机
包括的conf /额外/ httpd的的虚拟主机,phpmyadmin.conf
包括的conf /额外/ httpd的的虚拟主机,rails01.conf
包括的conf /额外/ httpd的的虚拟主机,rails02.conf
包括的conf /额外/ httpd的的虚拟主机,php01.conf
包括的conf /额外/ httpd的的虚拟主机,php02.conf
....
客运管理v型主机会像:结果
包括的conf /额外/ httpd的的虚拟主机,rails01.conf
<虚拟主机*:80>
服务器名rails01.lcl
的DocumentRoot/应用程序/ auser /应用/ rails01 /公
<目录/应用程序/ auser /应用/ rails01 /公众>
所有的AllowOverride
选项-MultiViews
< /目录>
< /虚拟主机>
基于PHP的V-主机会像:
包括的conf /额外/ httpd的的虚拟主机,php01.conf
<虚拟主机*:80>
服务器名php01.lcl
的DocumentRoot/应用程序/ auser /应用/ php01 /公
<目录/应用程序/ auser /应用/ php01 /公众>
有FollowSymLinks多视图
设置AllowOverride无
为了允许,拒绝
所有允许
< /目录>
< /虚拟主机>
是的,跑步机架/ Rails的PHP一起工作的肯定。
I'm setting a server where I will need to run Ruby On Rails 3 applications along with some PHP websites. The server is a CentOS 5.8 machine running Apache 2.4.3. The server is for testing and PRE-production, so performance is not an issue.
I'm using Phusion Passenger for the Rails apps, and I've created a bunch of virtual-hosts (with associated folders and DB accounts). Then, I'm planning to use other v-hosts for PHP.
Is it possible? How should I proceed?
Thank you very much
details:
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
....
Passenger-managed v-hosts will be like:
Include 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-based v-hosts will be like: Include 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>
Yes, Running Rack/Rails alongside PHP definitely works.
这篇关于走行轨与乘客一起PHP应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!