title: Deploy a rails application in a sub-directory with Passenger
body: <p>I have a website : <a href="http://foo.com" rel="nofollow">http://foo.com</a>
  I would like to add a rails application in : <a href="http://foo.com/subdir" rel="nofollow">http://foo.com/subdir</a>
  So I use a Apache Proxy to do it.</p>
  
  <p>In the server with the Rails application, I have Passenger and Apache, and my VirtualHost :</p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
    ServerName 1.2.3.4
  
    DocumentRoot /path/to/railsapp/public
    RailsEnv production
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>And when I go to <a href="http://foo.com/subdir" rel="nofollow">http://foo.com/subdir</a>, all the paths are incorect (http://foo.com/images, <a href="http://foo.com/users" rel="nofollow">http://foo.com/users</a>, ... etc) but what I would like is a subdirectory like (http://foo.com/subdir/images, <a href="http://foo.com/subdir/users" rel="nofollow">http://foo.com/subdir/users</a>, ... etc)</p>
  
  <p>So how could I do it please ?</p>
  
  <p>PS : I tried <a href="http://www.modrails.com/documentation/Users%20guide%20Apache.html#deploying_rails_to_sub_uri" rel="nofollow">RailsBaseURI</a>, but it don't work :(.</p>