Sunday, January 17, 2010

Re: [Rails] Forbidden error on rails app with Passenger and Apache

On Sun, Jan 17, 2010 at 6:42 PM, Vincent P <easebus@gmail.com> wrote:
I run a rails app at /home/vincent/Documents/vincentApp/ .  The app
runs fine with WEBrick on localhost:3000.  However, I am getting a
Forbidden error when accessing the app on Apache on port 80.  I
suspect this is more of a problem with my Apache config than with
Rails or Passenger.  The configs are below.  Please help.  Thanks.

I have Passenger installed.

The following is in /etc/apache2/apache2.conf:

# Passenger
LoadModule passenger_module /var/lib/gems/1.8/gems/passenger-2.2.8/ext/
apache2/mod_passenger.so
PassengerRoot /var/lib/gems/1.8/gems/passenger-2.2.8
PassengerRuby /usr/bin/ruby1.8

=======

The following is the content of the file /etc/apache2/sites-enabled/
default

<VirtualHost *:80>
       ServerAdmin webmaster@localhost

DocumentRoot /home/vincent/Documents/vincentApp/public
       <Directory />
               Options FollowSymLinks
               AllowOverride None
       </Directory>
<Directory "/home/vincent/Documents/vincentApp/public/">
Options FollowSymLinks Indexes
AllowOverride None
               Order allow,deny
               allow from all
</Directory>

       ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
       <Directory "/usr/lib/cgi-bin">
               AllowOverride None
               Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
               Order allow,deny
               Allow from all
       </Directory>

       ErrorLog /var/log/apache2/error.log

       # Possible values include: debug, info, notice, warn, error, crit,
       # alert, emerg.
       LogLevel warn

       CustomLog /var/log/apache2/access.log combined

   Alias /doc/ "/usr/share/doc/"
   <Directory "/usr/share/doc/">
       Options Indexes MultiViews FollowSymLinks
       AllowOverride None
       Order deny,allow
       Deny from all
       Allow from 127.0.0.0/255.0.0.0 ::1/128
   </Directory>

</VirtualHost>

=======
passenger status:

sudo /var/lib/gems/1.8/bin/passenger-status
----------- General information -----------
max      = 6
count    = 0
active   = 0
inactive = 0
Waiting on global queue: 0

----------- Domains -----------
=======
Apache log:

[Sun Jan 17 18:35:30 2010] [error] [client ::1] (13)Permission denied:
access to / denied



You can try adding the following after the second Directory block:

RailsBaseURI /

Next, I would verify that 'Allow from' is correct.  I have used the following
without fail:

Allow from all

Good luck,

-Conrad
 

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.




0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate