Apache permissions problem trying to get Passenger working for the first time

542 views
Skip to first unread message

Jordy Mont-Reynaud

unread,
Sep 23, 2009, 9:15:58 PM9/23/09
to phusion-...@googlegroups.com
Hi,

I just installed Passenger and am trying to get it to work on my Mac, running the default Apache installation. Apparently Passenger 1.0.2 supports Mac's default Apache out of the box, but I'm having issues.

When I fire up Apache (System Preferences -> Sharing -> Web Sharing On) and go to 127.0.0.1 in the browser, (or localhost, or my vhost jordy.texter.com), I see a 403 Forbidden Error.
In the apache logs, I see the following:

[Wed Sep 23 13:27:28 2009] [error] [client 127.0.0.1] (13)Permission denied: access to / denied
[Wed Sep 23 13:27:28 2009] [error] [client 127.0.0.1] (13)Permission denied: access to /favicon.ico denied, referer: http://jordy.texter.com/

Some Googling made me suspect that maybe there was a permissions problem with Mac default Apache accessing sites outside the /Sites directory, so I tried a quick hack of copying my entire Rails texter directory into /Sites and updating the apache logs. I get the a similar error:

[Wed Sep 23 18:09:03 2009] [error] [client 127.0.0.1] client denied by server configuration: /Users/jordym/Sites/texter/public/
[Wed Sep 23 18:09:03 2009] [error] [client 127.0.0.1] client denied by server configuration: /Users/jordym/Sites/texter/public/favicon.ico, referer: http://jordy.texter.com/

Permissions for the Rails texter directory is: drwxr-xr-x  20 jordym  staff   680 Sep 22 18:00 texter
I tried updating the group from staff to www, but that didn't help.

Any ideas what I should try next? 

If I have to, I could do another custom Apache install, but I feel like I should be able to get it to work with Mac's default install, and keep my Rails directory where it is. I feel like I'm just one quick permissions fix away, but I'm not sure what exactly that is.

All tips greatly appreciated!

Thanks,

Jordy

---------------------

Relevant details from my current set-up:

1. Rails project "texter"
lives at /Users/jordym/Documents/work/Ruby/texter
  
2. /etc/apache2/httpd.conf
...
User www
Group www
...
DocumentRoot "/Library/WebServer/Documents"
...
# User home directories - enabled                                                           
Include /private/etc/apache2/extra/httpd-userdir.conf

# Virtual hosts - enabled                                                                   
Include /private/etc/apache2/extra/httpd-vhosts.conf

# Phusion Passenger includes                                                      
LoadModule passenger_module /Users/jordym/.gem/ruby/1.8/gems/passenger-2.2.5/ext/\
apache2/mod_passenger.so
PassengerRoot /Users/jordym/.gem/ruby/1.8/gems/passenger-2.2.5
PassengerRuby /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby

3. /etc/apache2/extra/httpd-userdir.conf
UserDir /Users/jordym/Documents/work/Ruby

<Directory /Users/jordym/Documents/work/Ruby/>
    Options Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiVie\
ws
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

4. /etc/apache2/extra/httpd-vhosts.conf
<VirtualHost *:80>
             ServerName jordy.texter.com
             DocumentRoot /Users/jordym/Documents/work/Ruby/texter/public
             RailsEnv development
             ErrorLog /private/var/log/apache2/jordy.texter.com-error_log
</VirtualHost>

5. /etc/hosts
...
127.0.0.1       jordy.texter.com

Don French

unread,
Sep 25, 2009, 11:38:03 PM9/25/09
to Phusion Passenger Discussions
I am seeing the exact same problem.
OS X 10.5.8

On Sep 23, 3:15 pm, Jordy Mont-Reynaud <jor...@gmail.com> wrote:
> Hi,
> I just installed Passenger and am trying to get it to work on my Mac,
> running the default Apache installation. Apparently Passenger
> 1.0.2<http://blog.phusion.nl/2008/04/29/phusion-passenger-mod_rails-version...>supports
> Mac's default Apache out of the box, but I'm having issues.
>
> When I fire up Apache (System Preferences -> Sharing -> Web Sharing On) and
> go to 127.0.0.1 in the browser, (or localhost, or my vhost jordy.texter.com),
> I see a 403 Forbidden Error.
> In the apache logs, I see the following:
>
> *[Wed Sep 23 13:27:28 2009] [error] [client 127.0.0.1] (13)Permission
> denied: access to / denied*
> *[Wed Sep 23 13:27:28 2009] [error] [client 127.0.0.1] (13)Permission
> denied: access to /favicon.ico denied, referer:http://jordy.texter.com/*
>
> Some Googling made me suspect that maybe there was a permissions problem
> with Mac default Apache accessing sites outside the /Sites directory, so I
> tried a quick hack of copying my entire Rails texter directory into /Sites
> and updating the apache logs. I get the a similar error:
>
> *[Wed Sep 23 18:09:03 2009] [error] [client 127.0.0.1] client denied by
> server configuration: /Users/jordym/Sites/texter/public/*
> *[Wed Sep 23 18:09:03 2009] [error] [client 127.0.0.1] client denied by
> server configuration: /Users/jordym/Sites/texter/public/favicon.ico,
> referer:http://jordy.texter.com/*
>
> Permissions for the Rails texter directory is: *drwxr-xr-x  20 jordym  staff
>   680 Sep 22 18:00 texter*
> I tried updating the group from staff to www, but that didn't help.
>
> Any ideas what I should try next?
>
> If I have to, I could do another custom Apache install, but I feel like I
> should be able to get it to work with Mac's default install, and keep my
> Rails directory where it is. I feel like I'm just one quick permissions fix
> away, but I'm not sure what exactly that is.
>
> All tips greatly appreciated!
>
> Thanks,
>
> Jordy
>
> ---------------------
>
> Relevant details from my current set-up:
>
> *1. Rails project "texter"*
> lives at /Users/jordym/Documents/work/Ruby/texter
>
> *2. /etc/apache2/httpd.conf*
> ...
> User www
> *Group www*
> *...*
> *DocumentRoot "/Library/WebServer/Documents"*
> *...*
> *# User home directories - enabled
>                 *
> *Include /private/etc/apache2/extra/httpd-userdir.conf*
> *
> *
> *# Virtual hosts - enabled
>                 *
> *Include /private/etc/apache2/extra/httpd-vhosts.conf*
> *
> *
> *# Phusion Passenger includes
>        *
> *#http://www.modrails.com/documentation/Users%20guide%20Apache.html
>       *
> *LoadModule passenger_module
> /Users/jordym/.gem/ruby/1.8/gems/passenger-2.2.5/ext/\*
> *apache2/mod_passenger.so*
> *PassengerRoot /Users/jordym/.gem/ruby/1.8/gems/passenger-2.2.5*
> *PassengerRuby
> /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby*
> *
> *
> *3. /etc/apache2/extra/httpd-userdir.conf*
> *UserDir /Users/jordym/Documents/work/Ruby
>
> <Directory /Users/jordym/Documents/work/Ruby/>
>     Options Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI
> MultiVie\
> ws
>     AllowOverride All
>     Order allow,deny
>     Allow from all
> </Directory>
>
> 4. /etc/apache2/extra/httpd-vhosts.conf
> <VirtualHost *:80>
>              ServerName jordy.texter.com
>              DocumentRoot /Users/jordym/Documents/work/Ruby/texter/public
>              RailsEnv development
>              ErrorLog /private/var/log/apache2/jordy.texter.com-error_log
> </VirtualHost>
>
> *
> *5. /etc/hosts*
> *...*
> *127.0.0.1       jordy.texter.com*
>
> --http://www.curiousjordy.comhttp://www.twitter.com/curiousjordy

Richard Navarrete

unread,
Sep 26, 2009, 2:20:55 AM9/26/09
to phusion-...@googlegroups.com
Here's a write up I did on upgrading to SL... there's a link or two there from Ruby on Rails on how to upgrade which talks about Passenger.  Following that guide helped me, hopefully it will also help you.

http://codeprostitute.com/2009/09/26/snow-leopard-install-ruby-on-rails-mysql-dev-machine/

elliottg

unread,
Nov 22, 2009, 10:35:49 PM11/22/09
to Phusion Passenger Discussions
I too have the same issue when trying to get Passenger running under
my new Snow Leopard install. The app runs fine as a Mongrel deploy...

This is what my Apache log is showing:
(13)Permission denied: access to / denied

The thing is, I compared permissions on files I thought are relevant
on my other machine running a Passenger Rails stack with Leopard 10.5
and they were the same as the new Snow Leopard box.

Any thoughts?



On Sep 25, 10:38 pm, Don French <dhf0...@gmail.com> wrote:
> I am seeing the exact same problem.
> OS X 10.5.8
>
> On Sep 23, 3:15 pm, Jordy Mont-Reynaud <jor...@gmail.com> wrote:
>
>
>
> > Hi,
> > I just installed Passenger and am trying to get it to work on my Mac,
> > running the default Apache installation. Apparently Passenger
> > 1.0.2<http://blog.phusion.nl/2008/04/29/phusion-passenger-mod_rails-version...>supports
> > Mac's default Apache out of the box, but I'm having issues.
>
> > When I fire up Apache (System Preferences -> Sharing -> Web Sharing On) and
> > go to 127.0.0.1 in the browser, (or localhost, or my vhost jordy.texter.com),
> > I see a403Forbidden Error.

elliottg

unread,
Nov 22, 2009, 11:25:36 PM11/22/09
to Phusion Passenger Discussions
I usually put my dev Rails apps within ~/Documents. On my 10.5.*
machine ~/Documents was 755. My new SL install has ~/Documents set to
700 by default. Hence the 403. I ran chmod 755 ~/Documents on the SL
box and I was sorted.

I never remember changing the permissions on 10.5.* to 755... But that
was the difference.. that made all the difference.

EG
Reply all
Reply to author
Forward
0 new messages