title: "No such file or directory - config.ru" with Passenger + Sinatra + Apache
body: <p>I can't seem to pinpoint where the issue is, but I can't seem to get my app deployed to a sub URI. My gut says it's between my vhost config and my symlink, but this is my first time working with vhosts and passenger this extensively.</p>
  
  <p>I am greeted with the passenger error when I try to hit <a href="http://example.com/app" rel="nofollow">http://example.com/app</a>...</p>
  
  <pre><code>No such file or directory - config.ru
  </code></pre>
  
  <p>It shows Application Root:</p>
  
  <pre><code>/home/username/public/example.com/public
  </code></pre>
  
  <p>So as far as everything else goes... directory structure of site:</p>
  
  <pre><code>example.com/
      |-- public/
          |-- index.php
          |-- app/
              |-- config.ru         
              |-- app.rb      
              |-- public/           
              `-- tmp/              
                  `-- restart.txt 
  </code></pre>
  
  <p>vhosts in /etc/apache2/sites-available/example.com:</p>
  
  <pre><code># domain: example.com
  # public: /home/username/public/example.com/
  
  &lt;VirtualHost *:80&gt;
    # Admin email, Server Name (domain name), and any aliases
    ServerAdmin email@example.com
    ServerName  www.example.com
    ServerAlias example.com
  
    # Index file and Document Root (where the public files are located)
    DirectoryIndex index.html index.php
    DocumentRoot /home/username/public/example.com/public
     &lt;Directory /home/username/public/example.com/public&gt;
        Allow from all
     &lt;/Directory&gt;
  
    RackBaseURI /app
    &lt;Directory /home/username/public/example.com/public/app&gt;
        Options -MultiViews
    &lt;/Directory&gt;
  
    # Log file locations
    LogLevel warn
    ErrorLog  /home/username/public/example.com/log/error.log
    CustomLog /home/username/public/example.com/log/access.log combined
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>symlink I made:</p>
  
  <pre><code>ln -s /home/username/public/example.com/public/app/public /home/username/public/example.com/app
  </code></pre>
  
  <p>config.ru:</p>
  
  <pre><code>#!/usr/bin/env ruby
  require 'sinatra'
  
  require File.expand_path('app.rb',__FILE__)
  
  run Sinatra::Application
  </code></pre>
  
  <p>and the app.rb:</p>
  
  <pre><code>#!/usr/bin/env ruby
  # encoding: UTF-8
  require 'sinatra'
  
  get '/' do
      "App!"
  end
  </code></pre>
  
  <p>Not really sure what could be going wrong here, but I have multiple sites on this VPS so the directory structure is a little funky with so many public folders. I may be confusing myself.</p>