I've looked through a ton of posts but I just can't get past this 403 Forbidden error. I have:
- Updated nginx user permissions on website folder
- Updated passenger_ruby to use RVM wrapper directory
- Confirmed passenger_root path with passenger-config --root
I'm still getting a 403 and can't seem to find what I am missing.
Here are my files below.
Folder Structure (755 www-data):
--website
----app
----public
----tmp
----views
----config.ru
config.ru:
require 'rubygems'
require 'sinatra'
set :environment, ENV['RACK_ENV'].to_sym
disable :run, :reload
require File.expand_path '../app/main.rb', __FILE__
run Sinatra::Application
Server .conf:
server {
listen 80;
server_name website.com;
root /www/website/public; # <--- be sure to point to 'public'!
passenger_enabled on;
}
Nginx .conf:
passenger_root /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini;
passenger_ruby /usr/local/rvm/wrappers/ruby-2.2.1/ruby;
Example main.rb:
Require 'slim'
get "/"
slim: index
do
Sites Error Log:
2015/07/28 19:09:45 [error] 34000#0: *2 directory index of "/www/website/public/" is forbidden, client: 0.0.0.0, server: website.com, request: "GET / HTTP/1.1", host: "website.com"