I have a Rails app using a Virtual Ubuntu Server, Apache, Passenger, and Capistrano.

The first time I deployed the app with Capistrano I had set Passenger to select that first release with this code in httpd.conf file:

<VirtualHost *:80>
  ServerName ndeavor.ameipro.com
  DocumentRoot /opt/bitnami/projects/ndeavor/releases/20130306192753/public
 <Directory /opt/bitnami/projects/ndeavor/releases/20130306192753/public>
   Allow from all
   Options -MultiViews

And that started the correct 1st release of my Rails app.

Now, when I Cap Deploy, I would like Capistrano to automatically have Passenger launch the new release.

So, I uncommented these lines in deploy.rb

# If you are using Passenger mod_rails uncomment this:
  namespace :deploy do
  task :start do ; end
  task :stop do ; end

The new release was not started. Should I remove the VirtualHost entry from the https.conf file? Is there some step I'm missing?



When deploying with Capistrano, there is a symlink in your releases directory called current. Your document root should be pointed to the public directory at myapp/releases/current/public. Then, Capistrano updates the symlink on each deploy to point to the latest release.

  • Thanks for you help! I made the change and restarted Apache. But, now I'm getting Forbidden You don't have permission to access /home/index on this server. – Reddirt Mar 7 '13 at 22:33
  • What is /home/index? Your httpd.conf file should include /opt/bitnami/projects/ndeavor/current/public for the document root. Not sure where /home/index comes from – jxpx777 Mar 7 '13 at 22:36
  • I fixed it - there was another line in https.conf that needed the same myapp/releases/current/public. It was # This should be changed to whatever you set DocumentRoot to. # <Directory "/opt/bitnami/projects/ndeavor/current/public"> – Reddirt Mar 7 '13 at 22:39
  • Thanks man, your a legend! – Aaron Cole Sep 22 '14 at 7:07

Your Answer

