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 根目錄之外的共用_src 資料夾?

我需要在 a 上為 apache 執行此操作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 方法可以做到這一點,可以在以下連結中找到: 阿帕奇文檔

Option FollowSymlinks基本上,要么在節中使用 <directory>,要么定義目錄的別名。

相關內容