1

I have apache with the following 000-default file for my app

   <VirtualHost *:80>
      ServerName www.yourhost.com
      DocumentRoot /somewhere/public
      <Directory /somewhere/public>
         AllowOverride all
         Options -MultiViews
      </Directory>
   </VirtualHost>

I've restarted apache and now I get You don't have permission to access / on this server. when browsing to it.

Does anyone know what permissions to my app or if I have to add the app folder to the wheel group or something like that?

Joseph Le Brech
  • 267
  • 1
  • 2
  • 6

2 Answers2

1

Try adding Allow from all to the <Directory> stanza. Also, don't edit 000-default; use your own vhost config file in sites-{available,enabled}.

womble
  • 96,255
  • 29
  • 175
  • 230
  • I was also getting error 403, so I chowned to www-data:www-data is that right? – Joseph Le Brech Mar 04 '12 at 20:45
  • No, you should just set permissions so that the webserver can read the files -- usually o+x on the leading directories and o+r on the files themselves should be sufficient. – womble Mar 05 '12 at 00:44
1

To be able to browse through the directory structure you need to add the Indexes to Options so it reads

Options Indexes -MultiViews

And to answer your comment, yes the directory structure should be chown'ed to your webservers user. However be careful assigning stupid permission sets (e.g. 777) on the directory. There is no case where you'd require this if your webserver user (or group) is set correctly.

For rails to work you will however need more. Lookup for mod_passenger within your distribution. This is the connecting module for Ruby. Without that you most certainly will only be able to browse the code, not the app.

Chris
  • 1,185
  • 2
  • 9
  • 18