debian:跟随 basedir giers 错误之外的符号链接

debian:跟随 basedir giers 错误之外的符号链接

我有几个虚拟主机,每个都有文件夹。还有一个共享文件夹:

/home/website1
/home/website2
/home/website3
/home/shared_src

符号链接工作正常里面每个文件夹都放置到名为“codebase”的每个网站文件夹中。

我已将文件夹“codebase”复制到 /home/shared_src,并希望使用符号链接从其他每个网站访问 /home/shared_src_codebase。但执行此操作时,我得到了:

PHP Fatal error:  Cannot redeclare class [patch and class...]

我应该在 apache 配置中添加什么来允许符号链接到 Web 根目录之外的 shared_src 文件夹?

我需要在Debian 服务器。我尝试使用此处描述的别名。要么这不是诀窍,要么我做错了: 指向 webroot 之外目录的符号链接的安全性是否设置为 777?

在我曾经使用过的另一个系统(基于 CentOS)上,该设置称为 PHPBaseDir。在 Debian 上我不知道...

更新更多详细信息

该错误主要由于符号链接链接到与网站文件夹内物理文件夹同名的文件夹而导致。

/home/website1/typo3_src-6.2
/home/website/typo3_src -> /home/sharedsource/typo3_src-6.2 (symlink)

问题已经修复,现在我在 Apache 日志中得到了这个信息:

[Wed Jan 15 09:48:17 2014] [error] [client xx.xx.xx.xx] PHP Fatal error:  require_once(): Failed opening required '/home/cstmr_opengate/band.opengate.dk/website/typo3_src-6.2.0beta3/typo3/sysext/core/Resources/PHP/TYPO3.Flow/Classes/TYPO3/Flow/Package/PackageManager.php' (include_path='/home/cstmr_opengate/band.opengate.dk/website/typo3/contrib/pear/:.:/usr/share/php:/usr/share/pear') in /home/x_src/typo3_src-6.2.0beta3/typo3/sysext/core/Classes/Core/ClassLoader.php on line 178

因此问题可能不是符号链接本身。因为符号链接被跟踪到共享文件夹。这是使用符号链接后抛出的错误……

答案1

有两种 apache 方法可以做到这一点,可以在以下链接下找到: Apache 文档

Option FollowSymlinks基本上,要么在部分中使用 <directory>,要么为目录定义一个别名。

相关内容