我安装了全新的CentOS 6,在文档根目录中有一个指向我的开发文件的符号链接:
[root@localhost html]# ls -l
total 4
-rwxrwxrwx. 1 root root 0 Sep 18 20:16 index.html
-rwxrwxrwx. 1 root root 17 Sep 18 20:16 index.php
lrwxrwxrwx. 1 root root 24 Sep 18 20:19 refresh-app -> /home/billy/refresh-app/
我的httpd.conf具有:
<Directory "/">
Options All
AllowOverride None
Order allow,deny
Allow from all
</directory>
符号链接的目标具有权限,该权限应允许apache读取所需的任何内容:
[root@localhost billy]# ls -l
total 40 (Some entries were omitted because the list was too long
drwxr-xr-x. 7 billy billy 4096 Sep 18 20:03 refresh-app
我还尝试通过更改禁用SELinux /etc/selinux/conf
:
SELINUX=disabled
但是,无论我做什么,当有人尝试转到该链接时http://localhost/refresh-app/
,我都会看到403 FORBIDDEN错误页面,该页面写在/var/log/httpd/error_log
:
Symbolic link not allowed or link target not accessible
为什么Apache无法访问符号链接的目标?