Reputation: 10309
Cannot access document root folder files - get this error:
You don't have permission to access / on this server.
Apache version
Server version: Apache/2.2.22 (Ubuntu)
Virtual Host Configuration Inside sites-available
<VirtualHost *:80>
ServerName site1
ServerAlias www.site1
RailsEnv production
RackEnv production
DocumentRoot /var/www/site1/webservices/public
<Directory "/var/www/site/webservices/public">
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
Header set Access-Control-Allow-Origin "*"
</Directory>
</VirtualHost>
Inside apache2/hosts file added
127.0.0.1 site1
Restarted Apache2
/etc/init.d/apache2 restart
Can it be a permission issue?
Upvotes: 1
Views: 5373
Reputation: 30496
I think you need to tell Apache what to do with folders (as /
is a folder). You need to tell Apache what file should be used to list the folder content.
Try to set:
DirectoryIndex index.html
Now for ruby I'm not sure, but maybe you forgot the index.html file?
On the Options settings you could add Indexes, and remove Multiviews in case of, as Multiviews try to guess the file to use and this makes things harder usually. So using something like:
Options FollowSymLinks Indexes -Multiviews
Upvotes: 2