我有一个网站:http://foo.com 我想在添加一个Rails应用程序:http://foo.com/subdir 所以我使用Apache代理去做。部署在一个子目录中Rails应用程序与客运
在与Rails应用程序的服务器,我有乘客和Apache,我的虚拟主机:
<VirtualHost *:80>
ServerName 1.2.3.4
DocumentRoot /path/to/railsapp/public
RailsEnv production
</VirtualHost>
当我去http://foo.com/subdir,所有的路径都incorect(http://foo.com/图像,http://foo.com/users,...等),但我想是像(http://foo.com/subdir/images,http://foo.com/subdir/users,...等)
所以,我怎么能做到这一点的子目录吗?
PS:我试过RailsBaseURI,但它不工作:(
RailsBaseURI按照指定的方式工作。只需按照文档。 – AlexD
如果我将“RailsBaseURI/subdir”添加到我的VirtualHost,它将返回404它是我的foo.com/subdir。 也许是因为我背后是Apache Proxy? – Dorian
您是否按文档中所述创建了符号链接? – AlexD