【问题标题】:Deploy multiple rails applications on same dns using apache and passenger使用 apache 和乘客在同一个 dns 上部署多个 rails 应用程序
【发布时间】:2012-12-31 14:41:18
【问题描述】:

我已经在我的 ec2 服务器中设置了 apache + 乘客。 当我尝试

    http://ec2-***-***-***-**.ap-*-1.compute.amazonaws.com/

输出:

    It works!

    This is the default web page for this server.

    The web server software is running but no content has been added, yet.

接下来是

  ec2-***-***-***-**.ap-*-1.compute.amazonaws.com is mapped to a dns, say myserver.com

现在我想在这里运行多个 rails 应用程序,例如我有 app1、app2 和 app3 rails 应用程序。

myserver.com/app1、myserver.com/app2 和 myserver.com/app3 应该加载各自的应用程序。 我在

下查看了一些教程
            Deploying Rails with Sub URI: or creation of symlinks

但无法获得清晰的理解。有人可以指点我一些教程或给出一些基本的理解。

客运版是3.0.18

【问题讨论】:

标签: ruby-on-rails amazon-ec2 apache2 uri passenger


【解决方案1】:

你应该看看documentation

它使用 RailsBaseURI。

示例配置

<VirtualHost *:80>
    ServerName www.phusion.nl
    DocumentRoot /websites/phusion
    <Directory /websites/phusion>
        Allow from all
    </Directory>

    RailsBaseURI /rails                   # 
    <Directory /websites/phusion/rails>   # 
        Options -MultiViews               # 
    </Directory>                          # 
</VirtualHost>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-04-24
    相关资源
    最近更新 更多