Ruby on rails ApacheConf,带有Passenger和ProxyPassMatch正则表达式,用于多个Ruby on Rails应用程序
我有一个Apache Sling应用程序,由Apache提供服务。然而,当有人访问同一个url,但在url的前面有/mstarfb时,他们会通过Passenger获得Ruby on Rails应用程序的服务。我想添加第二个RubyonRails应用程序,由/I-隐喻提供服务 以下是我目前拥有和使用的:Ruby on rails ApacheConf,带有Passenger和ProxyPassMatch正则表达式,用于多个Ruby on Rails应用程序,ruby-on-rails,regex,apache,passenger,proxypass,Ruby On Rails,Regex,Apache,Passenger,Proxypass,我有一个Apache Sling应用程序,由Apache提供服务。然而,当有人访问同一个url,但在url的前面有/mstarfb时,他们会通过Passenger获得Ruby on Rails应用程序的服务。我想添加第二个RubyonRails应用程序,由/I-隐喻提供服务 以下是我目前拥有和使用的: <VirtualHost *:80> ServerName beta.example.com ProxyRequests Off <Proxy *>
<VirtualHost *:80>
ServerName beta.example.com
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
PassengerEnabled off
ProxyPassMatch ^/(?!mstarfb)(.*) http://127.0.0.1:8890/$1
ProxyPassReverse / http://beta.example.com:8890
DocumentRoot /home/ruby/webapps/m-star-fb/current/public
<Directory "/home/ruby/webapps/m-star-fb/current/public">
PassengerEnabled on
RailsBaseURI /mstarfb
# This relaxes Apache security settings.
AllowOverride all
# MultiViews must be turned off.
Options -MultiViews FollowSymLinks
Order allow,deny
Allow from all
</Directory>
第二个问题是如何组织虚拟主机?在我尝试过的代理行之后:
DocumentRoot /home/ruby/webapps
<Directory "/home/ruby/webapps/m-star-fb/current/public">
PassengerEnabled on
RailsBaseURI /mstarfb
AllowOverride all
Options -MultiViews FollowSymLinks
Order allow,deny
Allow from all
</Directory>
但它破坏了我的第一个应用程序。。。我还没有尝试添加第二个应用程序
DocumentRoot /home/ruby/webapps
<Directory "/home/ruby/webapps/m-star-fb/current/public">
PassengerEnabled on
RailsBaseURI /mstarfb
AllowOverride all
Options -MultiViews FollowSymLinks
Order allow,deny
Allow from all
</Directory>