403 Error when using passenger for rails deployment

Posted on Apr 3, 2011

I have been using passenger for local Rails deployment for about 6 months now. I love the flexibility of not having to run Rails server, which enables me to work with sub domains and all kinds of other good stuff.

Lately, about a month back I started using my good friend and co-worker @elado‘s tip of putting all of my codebase on Dropbox.

Here’s a link to his post.

The most amazing thing about it is that you get constant backup with each save, and yeah, don’t get smart on me, I use GIT of course.

Now, since I did that, I kept getting all kind of strange 403 errors from passenger telling me that I can’t pull the favicon.ico file and all sorts of nasty voodoo bugs like that.

I went into the access logs an figured out the problem. The problem was that Dropbox was not properly configured with all the permissions that Apache (passenger) needs.

So, I added these lines of code which solved my problem.

[xml]

<directory “/users/avitzurel/dropbox”>

Order allow,deny

Allow from all

[/xml]

The file (for me) sits in:

[shell]

/private/etc/apache2/httpd.conf

[/shell]

After you do that, don’t forget to restart Apache for it to pick up the changes in the file.

[shell]

sudo apachectl -k restart

[/shell]

Good luck!