Multiple apps one virtual host one domain

I’m trying to achieve the following:
Having a development server that runs multiple rails apps running wihout
creating a different virtual host for each apps.
my documentRoot is therefore /var/rails for my whole config
http://myserver/app1/controller/action -> (/var/rails/app1/…)
http://myserver/app2/controller/action -> (/var/rails/app2/…)
I’m under apache 1.3
mod rewrite seems to work since I’m able to capture app1 and redirecting
to the proper folder. But I’m stuck after that.

Has anyone manage to have this kind of configuration working and if so
how?

Tia for any help.

Add this line to your routes.rb.
ActionController::AbstractRequest.relative_url_root = “/app1”
Then all your links should work. Since mod_rewrite is rewriting all
the URLs for static content everything should work fine.

Taken from http://jarednevans.typepad.com/technoblog/2006/03/
how_to_setup_mu.html

Luke Amdor

can mongrel do this? lately lighttpd is complaining about symbol size
differences in famd and im feeling lazy about recompiling it…

Thanks for the tip. Works great now
Luke Amdor wrote:

Add this line to your routes.rb.
ActionController::AbstractRequest.relative_url_root = “/app1”
Then all your links should work. Since mod_rewrite is rewriting all
the URLs for static content everything should work fine.

Taken from http://jarednevans.typepad.com/technoblog/2006/03/
how_to_setup_mu.html

Luke Amdor

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs