title: Apache VirtualHosts for a Rails app
body: <p>On a server there is already a site running. I'm trying to make my rails app run on a url of the same site i.e the site is example.com and the rails app will run at example.com/railsapp.</p>
  
  <p>The rails app will use passenger and the server is ubuntu.
  The current virtualhosts file looks like;</p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
      DocumentRoot /var/www
      &lt;Directory /&gt;
          Options FollowSymLinks
          AllowOverride All
      &lt;/Directory&gt;
      &lt;Directory /var/www/&gt;
          Options Indexes FollowSymLinks MultiViews
          AllowOverride None
          Order allow,deny
          allow from all
      &lt;/Directory&gt;
      &lt;Directory /var/www/examplesite/&gt;
                  Options Indexes FollowSymlinks Multiviews
                  AllowOverride All
                  Order allow,deny
                  allow from all
      &lt;/Directory&gt;
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>Do I need to add a separate hosts file?</p>
  
  <pre><code>&lt;VirtualHost *:80&gt; 
   ServerName ??? 
   DocumentRoot /var/www/railsapp/public
   &lt;Directory /var/www/railsapp/public&gt; 
    AllowOverride all 
    # MultiViews must be turned off. 
    Options -MultiViews 
   &lt;/Directory&gt; 
  &lt;/VirtualHost&gt; 
  </code></pre>
  
  <p>I'm not sure what to do...</p>