【发布时间】:2014-05-23 07:20:25
【问题描述】:
无法访问文档根文件夹文件 - 出现此错误:
You don't have permission to access / on this server.
Apache 版本
Server version: Apache/2.2.22 (Ubuntu)
虚拟主机配置 内部网站-可用
<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>
添加到 apache2/hosts 文件中
127.0.0.1 site1
重启 Apache2
/etc/init.d/apache2 restart
可能是权限问题吗?
【问题讨论】:
-
检查文件系统中文档根文件夹的权限。也许,apache 没有权限遍历和/或读取文档根文件夹。使用
ls -l -
尝试以递归方式授予 drwxrwsrwx 对其中所有子文件夹的完全访问权限,但仍然出现相同的错误