我最近决定尝试使用 Rails。使用 PHP 时,我只是将所有 PHP 项目放在同一目录中。例如,我可能有http://ubuntu/app1
,http://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)