小编Der*_*iel的帖子

同一子域上的多个 Rails 应用程序?

我最近决定尝试使用 Rails。使用 PHP 时,我只是将所有 PHP 项目放在同一目录中。例如,我可能有http://ubuntu/app1http://ubuntu/app2等等。

我为 Rails ( http://ruby.ubuntu)创建了一个子域,安装了 Rails 和乘客,一切正常。但是,我可能错了,但看起来每个子域只能有一个 Rails 应用程序?

我的虚拟主机如下:

<VirtualHost *:80>
    ServerName ruby.ubuntu
    ServerAdmin webmaster@localhost

    DocumentRoot /var/www/ruby/blog/public

    <Directory /var/www/ruby/blog/public>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all
        RailsEnv development
    </Directory>

    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    <Directory "/usr/lib/cgi-bin">
        AllowOverride None
        Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
        Order allow,deny
        Allow from all
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog ${APACHE_LOG_DIR}/access.log …
Run Code Online (Sandbox Code Playgroud)

ubuntu ruby-on-rails phusion-passenger apache-2.2

2
推荐指数
1
解决办法
3320
查看次数