我在子 uri redmine.example.org/redmine 上有工作的 Rails 应用程序,我希望它在 redmine.example.org 上
/var/www/work/redmine.src is approot
/var/www/work/redmine is symlink to /var/www/work/redmine.src/public
<VirtualHost *:80>
DocumentRoot /var/www/work
ServerName redmine.example.org
ErrorLog /var/log/apache2/redmine-error_log
CustomLog /var/log/apache2/redmine-access_log combined
<Directory /var/www/work/redmine>
AllowOverride all
Options -MultiViews
Order allow,deny
allow from all
</Directory>
RackBaseURI /redmine
<Directory /var/www/work/redmine.src>
Options -MultiViews
Order allow,deny
allow from all
</Directory>
</VirtualHost>
我尝试了很多组合并在谷歌上搜索了几个小时,但没有任何效果。
我应该如何更改此配置以在子域根目录上部署 redmine?
提前致谢。
最佳答案
好吧,这比我想象的要容易。
当我反复阅读手册时,我找到了解决方案: link to manual
现在我的配置文件是这样的:
<VirtualHost *:80>
DocumentRoot /var/www/work/redmine.src/public
ServerName redmine.example.org
<Directory /var/www/work/redmine.src/public>
AllowOverride all
Options -MultiViews
Order allow,deny
allow from all
</Directory>
</VirtualHost>
关于ruby-on-rails - 如何使用 Apache 和 Passenger 在子域根目录上部署 Rails 应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17753631/