Dorian Dorian - 5 months ago 6
Ruby Question

Deploy a rails application in a sub-directory with Passenger

I have a website :
I would like to add a rails application in :
So I use a Apache Proxy to do it.

In the server with the Rails application, I have Passenger and Apache, and my VirtualHost :

<VirtualHost *:80>

DocumentRoot /path/to/railsapp/public
RailsEnv production

And when I go to, all the paths are incorect (,, ... etc) but what I would like is a subdirectory like (,, ... etc)

So how could I do it please ?

PS : I tried RailsBaseURI, but it don't work :(.


I moved my application to subdir/

I created a .htaccess with :

PassengerEnabled on
PassengerAppRoot /path/to/railsapp/subdir

And my VirtualHost :

  DocumentRoot /path/to/railsapp/  
  <Directory /path/to/railsapp/subdir>
    AllowOverride All
    RailsBaseURI /subdir

Thanks AlexD for trying to help me.