I’m trying to get Phusion Passenger working with Sinatra on Nginx and I am running into the same error as in this previous question. Sinatra on Nginx configuration – what's wrong?
Im sure the fix is the same. I just need to change the permissions for the user Nginx is running under to be able to read the contents of the proper directory.
The previos question is marked as answered but doesnt give specifics of how they fixed the problem.
I need to know,
1. How to identify the user nginx is running under
2. How to allow that user to read my application directory (/opt/nginx/html/sinatratest)
Note : I can setup and run a rails app and get to the rails welcome screen no problem with Phusion Passenger so i know that I have it setup and working.
Edit : Im running Mac OS X 10.6
Here are my files
Application
#myapp.rb
require 'sinatra'
get '/' do
'Hello world!'
end
Config
#config.ru
require 'rubygems'
require 'sinatra'
require 'myapp.rb'
run Sinatra::Application
Nginx Config block
server {
listen 8889;
server_name localhost;
root html/sinatratest
passenger_enabled on
}
Any help appreciated!
I solved this by adding a ‘./‘ before ‘myapp.rb‘ this is the working config.ru file.