我有一个全新的 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/
Run Code Online (Sandbox Code Playgroud)
我的 httpd.conf 有这个:
<Directory "/">
Options All
AllowOverride None
Order allow,deny
Allow from all
</directory>
Run Code Online (Sandbox Code Playgroud)
符号链接的目标具有允许 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 …
Run Code Online (Sandbox Code Playgroud)