Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/52.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails ApacheConf,带有Passenger和ProxyPassMatch正则表达式,用于多个Ruby on Rails应用程序_Ruby On Rails_Regex_Apache_Passenger_Proxypass - Fatal编程技术网

Ruby on rails ApacheConf,带有Passenger和ProxyPassMatch正则表达式,用于多个Ruby on Rails应用程序

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 *>

我有一个Apache Sling应用程序,由Apache提供服务。然而,当有人访问同一个url,但在url的前面有/mstarfb时,他们会通过Passenger获得Ruby on Rails应用程序的服务。我想添加第二个RubyonRails应用程序,由/I-隐喻提供服务

以下是我目前拥有和使用的:

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