我想设置一个网站,说http://example.com ,以便http://example.com/a/ <…>的请求将运行在RoR应用程序和http://example.com/b / <…>会在Django应用程序中运行。
这样可以configurationApache吗? 怎么样?
在Nginx上运行这样的站点会更好吗,而不是因为涉及内存开销?
Apache可以在目录级configuration。 由于RoR和Django都是框架,因此可以按照您的要求设置网站。
Django文档给出了如何在文档级configurationApache的一个很好的例子:
最后,你的虚拟主机文件应该是这样的:
<VirtualHost *> ServerName www.example.com <Location "/something"> Ror setup ... </Location> <Location "/otherthing"> Django setup ... </Location> </VirtualHost>
Passenger允许运行Rails,Rack和WSGI应用程序。