Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7571917
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T15:47:23+00:00 2026-05-30T15:47:23+00:00

This is my first rails app deploy, so please forgive me if the solution

  • 0

This is my first rails app deploy, so please forgive me if the solution to this problem is obvious… I’ve been getting a 403 error (Forbidden) whenever I try to load my rails app in a browser. The deploy (using capistrano) is finally going ahead without errors, but there seems to be something wonky about my apache or passenger settings. It seems apache is trying to load an index file from the public folder rather than letting passenger intervene. I don’t even get a passenger error screen when I load the app domain in a browser. I just get a Forbidden message. Has anyone else encountered the same problem?

Here’s the actual error log:

[Mon Feb 27 10:03:12 2012] [error] [client xxx.xxx.xxx.xx] Directory index forbidden by Options directive: /usr/local/www/sites/project.example.ca/public/

I’m assuming this basically means it’s erroring out because it can’t find an index.html file, but Passenger should be intercepting it before it tries to look for an index file. So this is probably an apache error, but the virtual host is configured according to the tutorial…

I’m running rails 3.1.3, ruby 1.9.2-p290, capistrano 2.1.12, Apache 2.2, rvm 1.10.2 and whichever version of passenger would have been installed by the install script about a month ago. I followed this guide while setting up passenger: http://beginrescueend.com/integration/passenger/

Any help would be hugely appreciated! It feels like I’ve been trying to deploy this app FOREVER.

Here’s my deploy file in case it helps:

$:.unshift(File.expand_path('./lib', ENV['rvm_path'])) 
require "rvm/capistrano"

set :application, "Project"

set :scm, "git"
set :repository,  "ssh://git@server.project.ca/usr/local/git_root/project.git"
set :user, "deploy"

#set :rvm_bin_path, "/usr/local/rvm/bin"
set :rvm_ruby_string, "ruby-1.9.2-p290@project"
set :normalize_asset_timestamps, false

ssh_options[:forward_agent] = true

set :branch, "master"

set :deploy_via, :remote_cache

set :deploy_to, "/usr/local/www/sites/project.example.ca/public/"

set :use_sudo, false

set :domain, 'project.example.ca'

role :app, domain
role :web, domain
role :db,  domain, :primary => true
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T15:47:24+00:00Added an answer on May 30, 2026 at 3:47 pm

    We figured out the 403 error. We were deploying to /usr/local/sites/www/project.example.ca/public. However, the way capistrano deploys, the actual application was at /usr/local/sites/www/project.example.ca/public/current/public. I blew away everything already there and tweaked the deploy.rb to point to /usr/local/www/sites/project.example.ca, and changed the virtual host to point to /usr/local/sites/www/project.example.ca/current/public, and now we get a Phusion Passenger error page at least.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having a problem deploying my Rails app to Heroku, where this error is
First as a note I am using this plugin in a Rails app. Ok
problem euler #5 i found the solution but i don't know why this first
I am trying to deploy my first rails app and struggling a bit. My
This is my first time trying to set up capistrano to deploy a rails
I've been trying to build my first rails app and have gotten stuck on
I'm getting permissions errors while trying to deploy my rails app to a friend's
I am getting a mysterious 500 error when i try to deploy my first
I'm trying to deploy a rails 3 app to heroku for the first time.
Okay so I was just starting this rails app and generated my first model

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.