apache设置中有一段
Alias /test "/var/www/web2/test"
<Directory "/var/www/web2/test">
    Options FollowSymLinks Indexes MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>如果此时 /var/www/web2/test 目录中有一个php下载的页面
down.php大概是这样:
$filename=$_GET["file"];
 
ob_end_clean();
header("Expires: 0");
if(!$file = @fopen($filename,'r')){
        echo 'read error';
        exit();
}
 
flock($file,LOCK_SH);
$filesize=filesize($filename);
 
Header("Content-type: application/octet-stream");
Header("Accept-Ranges: bytes");
Header("Accept-Length: ".$filesize);
Header("Content-Disposition: attachment; filename=" . $file_name);
if($filesize>0)
{
        echo fread($file,$filesize);
}
fclose($file);
ob_get_contents();
ob_end_clean();
exit;这个页面测试有很大的漏洞, 客户在浏览器输入down.php?file=../../../etc/xxx
类似的就能下载系统的文件。
请问如何配置apache让站点只能访问自身目录以及子目录,不能访问其他目录?