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.
I am greeted with the passenger error when I try to hit http://example.com/app...
No such file or directory - config.ru
It shows Application Root:
/home/username/public/example.com/public
So as far as everything else goes... directory structure of site:
example.com/
|-- public/
|-- index.php
|-- app/
|-- config.ru
|-- app.rb
|-- public/
`-- tmp/
`-- restart.txt
vhosts in /etc/apache2/sites-available/example.com:
# domain: example.com
# public: /home/username/public/example.com/
<VirtualHost *:80>
# 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
<Directory /home/username/public/example.com/public>
Allow from all
</Directory>
RackBaseURI /app
<Directory /home/username/public/example.com/public/app>
Options -MultiViews
</Directory>
# Log file locations
LogLevel warn
ErrorLog /home/username/public/example.com/log/error.log
CustomLog /home/username/public/example.com/log/access.log combined
</VirtualHost>
symlink I made:
ln -s /home/username/public/example.com/public/app/public /home/username/public/example.com/app
config.ru:
#!/usr/bin/env ruby
require 'sinatra'
require File.expand_path('app.rb',__FILE__)
run Sinatra::Application
and the app.rb:
#!/usr/bin/env ruby
# encoding: UTF-8
require 'sinatra'
get '/' do
"App!"
end
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.